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:59 UTC
[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.
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 )
{