kylixs commented on a change in pull request #9015:
URL: https://github.com/apache/dubbo/pull/9015#discussion_r728697474



##########
File path: 
dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperRegistry.java
##########
@@ -113,7 +114,7 @@ public boolean isAvailable() {
     public void destroy() {
         super.destroy();
         try {
-            zkClient.close();
+            zkClient.close(getUrl().getParameter(APPLICATION_KEY, ""));

Review comment:
       see https://github.com/apache/dubbo/pull/9033#discussion_r728694883
   The zk client is shared between ZookeeperRegistry , 
ZookeeperDynamicConfiguration and ZookeeperMetadataReport, if close it in one 
place, the other reference use the zk client may throw already destroyed 
exeception.
   The safe way is close zk clients in ApplicationDeployer.postDestroy() after 
release all zk components before onStopped(), some thing like: 
zookeeperTransporter.closeClientsOfApplication(application)




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