Andrew Kyle Purtell created ZOOKEEPER-5119:
----------------------------------------------
Summary: (C client) Switching from RO to RW servers corrupts state
Key: ZOOKEEPER-5119
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-5119
Project: ZooKeeper
Issue Type: Bug
Components: c client
Reporter: Andrew Kyle Purtell
Assignee: Andrew Kyle Purtell
When a read-only ZooKeeper client detects an available read-write server, it
drops its existing connection to upgrade the session. The C client's
implementation performs unsafe request teardown, leaking stale event-loop
descriptors and shared global state across client instances.
The fix is to treat the RO to RW upgrade as a reconnect, handling it
consistently as such, isolating all state to the individual affected handle.
This change maintains full API and ABI compatibility. Applications with
requests in flight during a server upgrade will observe expected
connection-loss behavior after the fix, instead of crashes or silent data
corruption.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)