Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Implemented
-
2.0.0-incubating
-
None
-
None
Description
See https://github.com/Netflix/curator/issues/266
InterProcessMutex, LeaderLatch, etc use an ephemeral node. If ZooKeeper gives a Disconnected event, the native client reconnects with the same session id, and the ephemeral node is preserved. If the ensemble changes at any point before a Disconnect, Curator's ConnectionState#checkState() calls handleNewConnectionString(), which constructs a new native ZK client, discarding the previous session id, and losing all locks.
This can be expensive.
Can ConnectionState be made to preserve the session id, or be more conservative about discarding the entire native client on a Disconnected event?
Clarifications:
An ensemble change (e.g. adding a new node to a cluster) does not mean that all session ids are now invalid. The next network glitch should not break locks.
There is no assumption in this description that the reconfiguration and the glitch/disconnection were related - they need not be.
Attachments
Issue Links
- is fixed by
-
CURATOR-551 Curator client always call updateServerList with original serverList value, not the ones updated by EnsembleTracker
- Resolved
- is related to
-
ZOOKEEPER-1683 ZooKeeper client NPE when updating server list on disconnected client
- Resolved
- relates to
-
ZOOKEEPER-1680 Cannot connect with a given sessionId - it is discarded
- Open
-
ZOOKEEPER-1684 Failure to update socket addresses on immedate connection
- Open
-
CURATOR-8 Possible mishandling of connection timeouts on large/shooty clusters
- Resolved