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 2020/04/02 13:17:58 UTC

[curator] branch CURATOR-525-fix-lost-state-race updated (d907766 -> 41e145d)

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

randgalt pushed a change to branch CURATOR-525-fix-lost-state-race
in repository https://gitbox.apache.org/repos/asf/curator.git.


 discard d907766  CURATOR-525 - instead of resetting the connection, change the state to RECONNECTED. I'm concerned about LOST/reset loops. This is still a bad hack and needs to be addressed in the future.
     new 41e145d  CURATOR-525 - instead of resetting the connection, change the state to RECONNECTED. I'm concerned about LOST/reset loops. This is still a bad hack and needs to be addressed in the future.

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   (d907766)
            \
             N -- N -- N   refs/heads/CURATOR-525-fix-lost-state-race (41e145d)

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:
 .../java/org/apache/curator/framework/state/ConnectionStateManager.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[curator] 01/01: CURATOR-525 - instead of resetting the connection, change the state to RECONNECTED. I'm concerned about LOST/reset loops. This is still a bad hack and needs to be addressed in the future.

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

randgalt pushed a commit to branch CURATOR-525-fix-lost-state-race
in repository https://gitbox.apache.org/repos/asf/curator.git

commit 41e145d3afe296ece4623e3be32d2c7bed4e155d
Author: randgalt <ra...@apache.org>
AuthorDate: Thu Apr 2 08:16:41 2020 -0500

    CURATOR-525 - instead of resetting the connection, change the state to RECONNECTED. I'm concerned about LOST/reset loops. This is still a bad hack and needs to be addressed in the future.
---
 .../org/apache/curator/framework/state/ConnectionStateManager.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java b/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
index 32ddb78..bdc015a 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
@@ -292,10 +292,10 @@ public class ConnectionStateManager implements Closeable
                     {
                         // CURATOR-525 - there is a race whereby LOST is sometimes set after the connection has been repaired
                         // this "hack" fixes it by resetting the connection
-                        log.warn("ConnectionState is LOST but isConnected() is true. Resetting connection.");
+                        log.warn("ConnectionState is LOST but isConnected() is true. Forcing RECONNECTED.");
                         try
                         {
-                            client.getZookeeperClient().reset();
+                            addStateChange(ConnectionState.RECONNECTED);
                         }
                         catch ( Exception e )
                         {