tisonkun commented on code in PR #1859:
URL: https://github.com/apache/zookeeper/pull/1859#discussion_r1119902283


##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java:
##########
@@ -684,7 +684,9 @@ public String getMaxPrefixWithQuota(String path) {
     public void addWatch(String basePath, Watcher watcher, int mode) {
         WatcherMode watcherMode = WatcherMode.fromZooDef(mode);
         dataWatches.addWatch(basePath, watcher, watcherMode);
-        childWatches.addWatch(basePath, watcher, watcherMode);
+        if (watcherMode != WatcherMode.PERSISTENT_RECURSIVE) {
+            childWatches.addWatch(basePath, watcher, watcherMode);
+        }

Review Comment:
   IIRC we filter out child watch events for PRESISTENT_RECURSIVE in 
https://github.com/apache/zookeeper/pull/1820.
   
   Do changes in this file optimize the server-side logic while it's not 
user-visible and has nothing to do with "Support different watch modes on same 
path"?



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