pkuwm commented on a change in pull request #1035:
URL: https://github.com/apache/helix/pull/1035#discussion_r435421480
##########
File path:
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java
##########
@@ -220,7 +227,15 @@ protected ZkClient(IZkConnection zkConnection, int
connectionTimeout, long opera
}
listeners.add(listener);
}
- return watchForChilds(path);
+
+ List<String> children = watchForChilds(path, skipWatchingNodeNotExist);
+ if (children == null && skipWatchingNodeNotExist) {
+ unsubscribeChildChanges(path, listener);
+ LOG.info("watchForChilds failed to install no-existing watch and add
listener. Path:" + path);
Review comment:
This api is run frequently. A good idea to use parameterize logging to
save some string concatenation overhead.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]