HanShuhang opened a new pull request, #7822:
URL: https://github.com/apache/kyuubi/pull/7822

   ### Why are the changes needed?
   Closes #7821.
   When a Kyuubi instance loses its ZooKeeper session and fails to reconnect 
within the configured retry window, `ZookeeperDiscoveryClient` starts graceful 
shutdown.
   If active sessions still exist, `stopGracefully` waits for them to finish. 
However, the Curator `PersistentNode` remains active during this period. A 
later `RECONNECTED` event can therefore recreate the service node and make an 
instance that is already draining discoverable again.
   This patch runs session draining in a separate thread and closes the 
persistent service node once the reconnect retry window is exhausted. Closing 
the node prevents Curator from recreating it after ZooKeeper reconnects, while 
existing sessions can still finish before the instance exits.
   
   ### How was this patch tested?
     build/mvn test -pl kyuubi-ha -am \
       -Dtest=none \
       
-DwildcardSuites=org.apache.kyuubi.ha.client.zookeeper.EmbeddedZookeeperDiscoveryClientSuite
   
   
   ### Was this patch assisted by generative AI tooling?
   Assisted-by: TRAE with GPT-6


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to