You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/05/28 05:40:59 UTC

[GitHub] [helix] kaisun2000 commented on a change in pull request #1035: [WIP] Fix leaking Zk path watch and Callbackhandler issue

kaisun2000 commented on a change in pull request #1035:
URL: https://github.com/apache/helix/pull/1035#discussion_r431592934



##########
File path: zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java
##########
@@ -1858,24 +1923,47 @@ public Object call() throws Exception {
     });
   }
 
+  private boolean watchForData(final String path, boolean skipWatchingNodeNotExist) {
+    try {
+      if (skipWatchingNodeNotExist) {
+        Stat stat = new Stat();
+        retryUntilConnected(() -> (((ZkConnection) getConnection()).getZookeeper().getData(path, true, stat)));

Review comment:
       You are right, we can discuss this a little bit more in a meeting. It would be idea if Zookeeper has an exist() API that won't not install watch if the znode does not exist. 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org