Skip to content
Browse files

Don't throw an exception on missing node if there's been a connection…

… loss
  • Loading branch information...
1 parent 44c06bd commit 575cc377fe1023f1514f85f8cca4c03dd16ac251 @Randgalt Randgalt committed Aug 2, 2012
View
8 CHANGES.txt
@@ -1,5 +1,5 @@
-1.1.16/1.0.17 - xxxxxxxxxxxxx
-=============================
+1.1.16/1.0.17 - August 2, 2012
+==============================
* Merge 114 from amuraru: Make sure internal executor services are not started until startup.
* Merge 116 from samuelgmartinez: Fix for Issue 115: Wrong behaviour in LeaderLatch when a candidate
@@ -22,6 +22,10 @@ TestingCluster.
* Issue 125: Use ScheduledThreadPoolExecutor instead of blocking threads that have period work.
+* Issue 126: Added getNamespace() method.
+
+* Issue 120: Additional check for connection loss in DistributedDoubleBarrier.
+
1.1.15/1.0.16 - July 14, 2012
=============================
* Added ChildReaper. This builds on the newly added Reaper. This utility monitors a single node
View
9 ...rc/main/java/com/netflix/curator/framework/recipes/barriers/DistributedDoubleBarrier.java
@@ -210,7 +210,14 @@ private boolean internalLeave(long startMs, boolean hasMaxWait, long maxWaitMs)
int ourIndex = children.indexOf(ourPathName);
if ( (ourIndex < 0) && ourNodeShouldExist )
{
- throw new IllegalStateException(String.format("Our path (%s) is missing", ourPathName));
+ if ( connectionLost.get() )
+ {
+ break; // connection was lost but we've reconnected. However, our ephemeral node is gone
+ }
+ else
+ {
+ throw new IllegalStateException(String.format("Our path (%s) is missing", ourPathName));
+ }
}
if ( children.size() == 1 )

0 comments on commit 575cc37

Please sign in to comment.
Something went wrong with that request. Please try again.