Kezhu Wang created ZOOKEEPER-4471: ------------------------------------- Summary: Remove WatcherType.Children break persistent watcher's child events Key: ZOOKEEPER-4471 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4471 Project: ZooKeeper Issue Type: Bug Components: server Affects Versions: 3.7.0, 3.6.3 Reporter: Kezhu Wang
{{AddWatchMode.PERSISTENT}} was divided as data and child watch in server side. When remove {{WatcherType.Children}}, child part of {{AddWatchMode.PERSISTENT}} is removed but not its data part. This could introduce trick usage of persistent data watch while there is no official api for this. It is better forbid this by dedicate {{WatcherType.Children}} to standard child watch only. I [commits|https://github.com/kezhuw/zookeeper/commit/f7a996646074114830bdc2361e8ff679d08c00bc] a modified {{RemoveWatchesTest.testRemoveAllChildWatchesOnAPath}} in my local repo to reproduce this. I think it is better to support {{removeWatches}} for two persistent watchers too. But it might be a separate issue. -- This message was sent by Atlassian Jira (v8.20.1#820001)