[
https://issues.apache.org/jira/browse/ZOOKEEPER-4947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated ZOOKEEPER-4947:
--------------------------------------
Labels: pull-request-available (was: )
> When ZooKeeper client enters AuthFailed state (e.g., due to SASL
> authentication failure), calling `close()` method does not terminate
> internal SendThread and EventThread.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-4947
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4947
> Project: ZooKeeper
> Issue Type: Bug
> Components: java client
> Affects Versions: 3.4.8, 3.6.1, 3.8.0, 3.7.1, 3.9.0
> Reporter: baiyiwen
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Problem
> When ZooKeeper client enters AuthFailed state (e.g., due to SASL
> authentication failure),
> calling `close()` method does not terminate internal SendThread and
> EventThread.
> Reproduction Steps
> 1. Configure SASL authentication with invalid credentials
> 2. Connect to ZooKeeper server
> 3. Watch receives `KeeperState.AuthFailed` event
> 4. Call `zookeeper.close()`
> 5. Observe SendThread/EventThread still running via thread dump
> Expected Behavior
> All client resources including background threads should be released.
> Proposed Fix
> Remove state check in close method:
> public synchronized void close() throws InterruptedException {
> if (cnxn != null) {
> cnxn.close();
> }
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)