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/11/11 13:24:34 UTC

[tinkerpop] branch travis-fix updated (2a0324a -> ec1c86e)

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

spmallette pushed a change to branch travis-fix
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


 discard 2a0324a  trying settings prior to xenial bump
 discard f669f4d  maybe oraclejdk9?
 discard d3324ff  trying oraclejdk8
 discard f4a04d1  Merge remote-tracking branch 'origin/revert_tinkerpop-2289' into travis-fix
    omit b5b48a4  Reverts TINKERPOP-2289 resolve ip address
     new ec1c86e  Prevent a null pointer when session kill futuer is not present CTR

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2a0324a)
            \
             N -- N -- N   refs/heads/travis-fix (ec1c86e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml                                        | 15 +++----
 CHANGELOG.asciidoc                                 |  1 -
 gremlin-driver/pom.xml                             | 18 +++++++++
 .../apache/tinkerpop/gremlin/driver/Cluster.java   | 24 +++++++----
 .../org/apache/tinkerpop/gremlin/driver/Host.java  |  3 +-
 .../apache/tinkerpop/gremlin/driver/HostTest.java  | 46 +++++++++++++++++++++-
 .../gremlin/server/op/session/Session.java         |  8 +++-
 .../server/op/session/SessionOpProcessor.java      |  1 -
 8 files changed, 96 insertions(+), 20 deletions(-)


[tinkerpop] 01/01: Prevent a null pointer when session kill futuer is not present CTR

Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ec1c86e21f5c2ab38f1f9e4cc2f324cbb8af8c87
Author: stephen <sp...@gmail.com>
AuthorDate: Mon Nov 11 08:23:31 2019 -0500

    Prevent a null pointer when session kill futuer is not present CTR
---
 .../org/apache/tinkerpop/gremlin/server/op/session/Session.java   | 8 +++++++-
 .../tinkerpop/gremlin/server/op/session/SessionOpProcessor.java   | 1 -
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
index f41a0fb..7191d04 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/Session.java
@@ -34,6 +34,7 @@ import javax.script.Bindings;
 import javax.script.SimpleBindings;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -155,7 +156,12 @@ public class Session {
      * session kill will mean.
      */
     public void manualKill(final boolean force) {
-        kill.get().cancel(true);
+        // seems there is a situation where kill can get nulled. seems to only happen in travis as a result of test
+        // runs and i'm guessing it has something to do with a combination of shutdown and session close though i'm
+        // not sure why. perhaps this "fix" just masks up a deeper problem but as i reason on it now, it seems mostly
+        // bound to shutdown situations which basically means the forced end of the session anyway, so perhaps the
+        // root cause isn't something that needs immediate chasing (at least until it can be shown otherwise anyway)
+        Optional.ofNullable(kill.get()).ifPresent(f -> f.cancel(true));
         kill(force);
     }
 
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
index 54a409b..545ae7e 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java
@@ -124,7 +124,6 @@ public class SessionOpProcessor extends AbstractEvalOpProcessor {
     /**
      * Session based requests accept a "close" operator in addition to "eval". A close will trigger the session to be
      * killed and any uncommitted transaction to be rolled-back.
-     * @return
      */
     @Override
     public Optional<ThrowingConsumer<Context>> selectOther(final RequestMessage requestMessage) throws OpProcessorException {