You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by es...@apache.org on 2016/07/26 16:32:51 UTC

incubator-geode git commit: GEODE-1692: Handle IllegalStateException when node is disconnecting from distributed system.

Repository: incubator-geode
Updated Branches:
  refs/heads/develop 08016b32b -> b3b2c8909


GEODE-1692: Handle IllegalStateException when node is disconnecting from distributed system.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b3b2c890
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b3b2c890
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b3b2c890

Branch: refs/heads/develop
Commit: b3b2c89098efb71d57c7788b03cf6c933bdd58b1
Parents: 08016b3
Author: eshu <es...@pivotal.io>
Authored: Tue Jul 26 09:30:59 2016 -0700
Committer: eshu <es...@pivotal.io>
Committed: Tue Jul 26 09:30:59 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/cache/TXLockRequest.java   | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3b2c890/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXLockRequest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXLockRequest.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXLockRequest.java
index b9594d5..5f8283e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXLockRequest.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXLockRequest.java
@@ -95,8 +95,15 @@ public class TXLockRequest {
    */
   public void releaseDistributed() {
     if (this.distLockId != null) {
-      TXLockService txls = TXLockService.createDTLS();
-      txls.release(this.distLockId);
+      try {
+        TXLockService txls = TXLockService.createDTLS();
+        txls.release(this.distLockId);
+      } catch (IllegalStateException ignore) {
+        //IllegalStateException: TXLockService cannot be created 
+        //until connected to distributed system
+        //could be thrown if a jvm is disconnected from the ds, 
+        //and tries to createDTLS() during clean up
+      }
       this.distLockId = null;
     }
   }