kezhuw commented on code in PR #1820: URL: https://github.com/apache/zookeeper/pull/1820#discussion_r909147878
########## zookeeper-server/src/main/java/org/apache/zookeeper/ZKWatchManager.java: ########## @@ -442,10 +442,13 @@ public Set<Watcher> materialize( return result; } - private void addPersistentWatches(String clientPath, Set<Watcher> result) { + private void addPersistentWatches(String clientPath, Watcher.Event.EventType type, Set<Watcher> result) { synchronized (persistentWatches) { addTo(persistentWatches.get(clientPath), result); } + if (type == Watcher.Event.EventType.NodeChildrenChanged) { Review Comment: Add comments to explain why this is necessary and why this must be done in client side. -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org