zrlw commented on a change in pull request #9033:
URL: https://github.com/apache/dubbo/pull/9033#discussion_r728672800



##########
File path: 
dubbo-configcenter/dubbo-configcenter-zookeeper/src/main/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfiguration.java
##########
@@ -82,8 +82,10 @@ public String getInternalProperty(String key) {
 
     @Override
     protected void doClose() throws Exception {
-        // TODO zkClient is shared in framework, should not close it here?
+        // zkClient is shared in framework, should not close it here

Review comment:
       > @AlbumenJ @zrlw There are two ideas:
   > 
   > 1. Zk Clients are shared within application scope and isolated among 
different applications
   > 2. Record the applications associated with each ZK client. When an 
application is stopped, you can close the ZK Clients that are no longer used.
   > 
   > If there is no strong need to share ZK Clients within the Framework, I 
think the first one is better.
   
   #9015 close zookeeper client that is no long used by any application.
   the advantage is the zk connection will be closed immediately if it's not 
used anymore.
   app A -> zk server IP-A, app B -> zk server IP-B, Notice: IP-A is not equal 
IP-B !!!
   the zk connection of app A will be closed immediately if A exit and B still 
going on.
   if put them in the global zookeeper transporter, close operation must wait 
another app exit, it will cause curator client keep trying reconnect to the 
closed zk server and trigger huge curator connection failed events.




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