[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-5119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Kyle Purtell updated ZOOKEEPER-5119:
-------------------------------------------
    Description: 
When a read-only C client detects an available read-write server, it drops its 
existing read-only 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.

  was:
When a read-only C 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.


> (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
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When a read-only C client detects an available read-write server, it drops 
> its existing read-only 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)

Reply via email to