You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2013/11/10 03:49:30 UTC

[1/2] git commit: It turns out to be incorrect to not try to recreate the node when in the suspended state. The side effect of this was that if all retries failed, etc. the node might never get recreated.

Updated Branches:
  refs/heads/CURATOR-72 d8df3b13d -> f836c7acb


It turns out to be incorrect to not try to recreate the node when in the suspended state. The side effect of this was that if all retries failed, etc. the node might never get recreated.

NOTE: this might also be related to the re-opened CURATOR-53


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/54a0ea7c
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/54a0ea7c
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/54a0ea7c

Branch: refs/heads/CURATOR-72
Commit: 54a0ea7c0a9302c1f3878d3e2140f0ba7a96570e
Parents: 9299e9b
Author: randgalt <ra...@apache.org>
Authored: Sat Nov 9 18:47:57 2013 -0800
Committer: randgalt <ra...@apache.org>
Committed: Sat Nov 9 18:48:26 2013 -0800

----------------------------------------------------------------------
 .../framework/recipes/nodes/PersistentEphemeralNode.java        | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/54a0ea7c/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
index b178a00..053965b 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
@@ -39,7 +39,6 @@ import java.io.IOException;
 import java.util.Arrays;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 
 /**
@@ -63,7 +62,6 @@ public class PersistentEphemeralNode implements Closeable
     private final Mode mode;
     private final AtomicReference<byte[]> data = new AtomicReference<byte[]>();
     private final AtomicReference<State> state = new AtomicReference<State>(State.LATENT);
-    private final AtomicBoolean isSuspended = new AtomicBoolean(false);
     private final BackgroundCallback backgroundCallback;
     private final Watcher watcher = new Watcher()
     {
@@ -81,7 +79,6 @@ public class PersistentEphemeralNode implements Closeable
         @Override
         public void stateChanged(CuratorFramework client, ConnectionState newState)
         {
-            isSuspended.set((newState != ConnectionState.RECONNECTED) && (newState != ConnectionState.CONNECTED));
             if ( newState == ConnectionState.RECONNECTED )
             {
                 createNode();
@@ -378,6 +375,6 @@ public class PersistentEphemeralNode implements Closeable
 
     private boolean isActive()
     {
-        return (state.get() == State.STARTED) && !isSuspended.get();
+        return (state.get() == State.STARTED);
     }
 }
\ No newline at end of file


[2/2] git commit: Merge branch 'CURATOR-72' of https://git-wip-us.apache.org/repos/asf/curator into CURATOR-72

Posted by ra...@apache.org.
Merge branch 'CURATOR-72' of https://git-wip-us.apache.org/repos/asf/curator into CURATOR-72


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

Branch: refs/heads/CURATOR-72
Commit: f836c7acb5f195be91a0c37cf63d0589f50567aa
Parents: 54a0ea7 d8df3b1
Author: randgalt <ra...@apache.org>
Authored: Sat Nov 9 18:49:16 2013 -0800
Committer: randgalt <ra...@apache.org>
Committed: Sat Nov 9 18:49:16 2013 -0800

----------------------------------------------------------------------

----------------------------------------------------------------------