You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2019/05/06 12:11:14 UTC

[tinkerpop] branch master updated: TINKERPOP-2204 Prevent client-side hangs if server metadata generation fails CTR

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a25284  TINKERPOP-2204 Prevent client-side hangs if server metadata generation fails CTR
     new 36abc7a8 Merge branch 'tp33'
6a25284 is described below

commit 6a252845c1d0a40e3d177242a4e23b580c49b613
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Mon May 6 08:09:24 2019 -0400

    TINKERPOP-2204 Prevent client-side hangs if server metadata generation fails CTR
---
 CHANGELOG.asciidoc                                                     | 1 +
 .../tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index c612084..db6748d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -28,6 +28,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Removed `gperfutils` dependencies from Gremlin Console.
 * Fixed `PartitionStrategy` when setting vertex label and having `includeMetaProperties` configured to `true`.
 * Ensure `gremlin.sh` works when directories contain spaces.
+* Prevented client-side hangs if metadata generation fails on the server.
 * Fixed bug with `EventStrategy` in relation to `addE()` where detachment was not happening properly.
 * Ensured that `gremlin.sh` works when directories contain spaces.
 * Enabled `ctrl+c` to interrupt long running processes in Gremlin Console.
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
index 6d74e61..7bfd106 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
@@ -539,9 +539,10 @@ public class TraversalOpProcessor extends AbstractOpProcessor {
                     // serialize here because in sessionless requests the serialization must occur in the same
                     // thread as the eval.  as eval occurs in the GremlinExecutor there's no way to get back to the
                     // thread that processed the eval of the script so, we have to push serialization down into that
+                    final Map<String, Object> metadata = generateMetaData(ctx, msg, code, itty);
                     Frame frame = null;
                     try {
-                        frame = makeFrame(ctx, msg, serializer, useBinary, aggregate, code, generateMetaData(ctx, msg, code, itty));
+                        frame = makeFrame(ctx, msg, serializer, useBinary, aggregate, code, metadata);
                     } catch (Exception ex) {
                         // a frame may use a Bytebuf which is a countable release - if it does not get written
                         // downstream it needs to be released here