zhangxinyao88 commented on code in PR #7840:
URL: https://github.com/apache/kyuubi/pull/7840#discussion_r4476595928


##########
kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClient.scala:
##########
@@ -401,11 +407,12 @@ class ZookeeperDiscoveryClient(conf: KyuubiConf) extends 
DiscoveryClient {
   }
 
   private def watchNode(): Unit = {
-    if (zkClient.checkExists
-        
.usingWatcher(watcher.asInstanceOf[Watcher]).forPath(serviceNode.getActualPath) 
== null) {
-      // No node exists, throw exception
-      throw new KyuubiException(s"Unable to create znode for this Kyuubi " +
-        s"instance[${watcher.instance}] on ZooKeeper.")
+    // A queued NodeDataChanged event can arrive after deregistration.
+    Option(serviceNode).flatMap(node => Option(node.getActualPath)).foreach { 
path =>

Review Comment:
   Fixed in `1c7124f`. Explicit shutdown now waits for active sessions without 
relying on the ZooKeeper deletion callback. The queued-callback regression 
passed in the [JDK 25 / Spark 4.3 fork 
run](https://github.com/zhangxinyao88/kyuubi/actions/runs/41914754436/job/126871357138).
   



-- 
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