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 2018/07/18 20:31:38 UTC

[1/2] tinkerpop git commit: TINKERPOP-1999 Fixed bug introduced in previous fix to this issue

Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 051892767 -> 398ab9c90


TINKERPOP-1999 Fixed bug introduced in previous fix to this issue

The problem was introduced at 3dcabd4f1b23fecde28c79a10502ad562d934c8d - by throwing an exception on the client in channelInactive() it would trigger double reporting of exception in normal shutdowns and other odd behavior including errors in doc generation. Instead of an exception we just release pending messages which releases any blocked threads (which was the original nature of the problem this issue set out to fix). CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0272a2e4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0272a2e4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0272a2e4

Branch: refs/heads/tp33
Commit: 0272a2e42cd7cafaf7e51b6ef56f5cd6e5b3d691
Parents: 6c6ab32
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 18 11:06:43 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 18 11:06:43 2018 -0400

----------------------------------------------------------------------
 .../java/org/apache/tinkerpop/gremlin/driver/Handler.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0272a2e4/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java
index a6528b2..b8d9078 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java
@@ -205,7 +205,10 @@ final class Handler {
             // occurs when the server shutsdown in a disorderly fashion, otherwise in an orderly shutdown the server
             // should fire off a close message which will properly release the driver.
             super.channelInactive(ctx);
-            throw new IllegalStateException("Connection to server is no longer active");
+
+            // the channel isn't going to get anymore results as it is closed so release all pending requests
+            pending.values().forEach(val -> val.markError(new IllegalStateException("Connection to server is no longer active")));
+            pending.clear();
         }
 
         @Override
@@ -277,7 +280,7 @@ final class Handler {
 
             // serialization exceptions should not close the channel - that's worth a retry
             if (!IteratorUtils.anyMatch(ExceptionUtils.getThrowableList(cause).iterator(), t -> t instanceof SerializationException))
-                ctx.close();
+                if (ctx.channel().isActive()) ctx.close();
         }
     }
 


[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by sp...@apache.org.
Merge branch 'tp32' into tp33


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/398ab9c9
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/398ab9c9
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/398ab9c9

Branch: refs/heads/tp33
Commit: 398ab9c90b41592759e7b14406b157ce7eed7b6d
Parents: 0518927 0272a2e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jul 18 16:30:26 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jul 18 16:30:26 2018 -0400

----------------------------------------------------------------------
 .../java/org/apache/tinkerpop/gremlin/driver/Handler.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/398ab9c9/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java
----------------------------------------------------------------------