congbobo184 commented on code in PR #4342:
URL: https://github.com/apache/bookkeeper/pull/4342#discussion_r1592446786


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataDriverBase.java:
##########
@@ -247,6 +256,19 @@ protected void initialize(AbstractConfiguration<?> conf,
             acls);
     }
 
+    private synchronized void handleState(Watcher.Event.KeeperState 
zkClientState) {

Review Comment:
   
https://github.com/apache/bookkeeper/blob/c4fa8c20131fb5e52b7448ee6ee1491bf9e870fa/bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/zk/ZKMetadataClientDriver.java#L57
   because this line add synchronized
   
https://github.com/apache/bookkeeper/blob/c4fa8c20131fb5e52b7448ee6ee1491bf9e870fa/bookkeeper-server/src/main/java/org/apache/bookkeeper/zookeeper/ZooKeeperClient.java#L260
   this line is sync method, so I remove the synchronized.
   this interface is not a consistent method, I think add volatile is enough
   
   what do you think? @eolivelli 



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

Reply via email to