[
https://issues.apache.org/jira/browse/TINKERPOP-1458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15552165#comment-15552165
]
ASF GitHub Bot commented on TINKERPOP-1458:
-------------------------------------------
Github user spmallette commented on a diff in the pull request:
https://github.com/apache/tinkerpop/pull/451#discussion_r82211073
--- Diff:
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/remote/DriverRemoteTraversalSideEffects.java
---
@@ -54,22 +57,30 @@ public DriverRemoteTraversalSideEffects(final Client
client, final UUID serverSi
@Override
public <V> V get(final String key) throws IllegalArgumentException {
if (!sideEffects.containsKey(key)) {
- // specify the ARGS_HOST so that the LoadBalancingStrategy is
subverted and the connection is forced
- // from the specified host (i.e. the host from the previous
request as that host will hold the side-effects)
- final RequestMessage msg =
RequestMessage.build(Tokens.OPS_GATHER)
- .addArg(Tokens.ARGS_SIDE_EFFECT, serverSideEffect)
- .addArg(Tokens.ARGS_SIDE_EFFECT_KEY, key)
- .addArg(Tokens.ARGS_HOST, host)
- .processor("traversal").create();
- try {
- final Result result = client.submitAsync(msg).get().one();
- sideEffects.put(key, null == result ? null :
result.getObject());
- } catch (Exception ex) {
- final Throwable root = ExceptionUtils.getRootCause(ex);
- if (root.getMessage().equals("Could not find side-effects
for " + serverSideEffect + "."))
- sideEffects.put(key, null);
- else
- throw new RuntimeException("Could not get keys", root);
+ if (!closed) {
+ // specify the ARGS_HOST so that the LoadBalancingStrategy
is subverted and the connection is forced
+ // from the specified host (i.e. the host from the
previous request as that host will hold the side-effects)
+ final RequestMessage msg =
RequestMessage.build(Tokens.OPS_GATHER)
+ .addArg(Tokens.ARGS_SIDE_EFFECT, serverSideEffect)
+ .addArg(Tokens.ARGS_SIDE_EFFECT_KEY, key)
+ .addArg(Tokens.ARGS_HOST, host)
+ .processor("traversal").create();
+ try {
+ final Result result =
client.submitAsync(msg).get().one();
+ sideEffects.put(key, null == result ? null :
result.getObject());
+ if (keys.isEmpty())
--- End diff --
Not sure if you should check `isEmpty()`. Maybe better to check:
```java
if (keys == Collections.emptySet())
```
That's really when you want to new up a fresh `HashSet`, not just when its
empty.
> Gremlin Server doesn't return confirmation upon Traversal OpProcessor "close"
> op
> --------------------------------------------------------------------------------
>
> Key: TINKERPOP-1458
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1458
> Project: TinkerPop
> Issue Type: Bug
> Components: server
> Affects Versions: 3.2.2
> Reporter: David M. Brown
> Assignee: David M. Brown
> Fix For: 3.2.3
>
>
> Gremlin Server should return some sort of success message to driver upon
> invalidating the side effect cache for a traversal.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)