kezhuw opened a new pull request, #1998:
URL: https://github.com/apache/zookeeper/pull/1998

   Before ZOOKEEPER-1416, `WatcherType.Children` was used to remove watchers 
attached through `ZooKeeper.getChildren`. `WatcherType.Data` was used to remove 
watchers attached through `ZooKeeper.getData` and `ZooKeeper.exists`.
   
   ZOOKEEPER-1416 adds `AddWatchMode.PERSISTENT`. This watcher could be 
completed remove using `WatcherType.Any`. But when removing through 
`WatcherType.Data` or `WatcherType.Children`, part of `AddWatchMode.PERSISTENT` 
will be left behind. And we get persistent children or data watchers.
   
   We are never claiming to support these type of watchers. So fix it.
   
   In rare chance, we are going to support persistent data or children watchers 
in future, I think we probably don't want to do such "magic" thing in 
ZooKeeper. So fix it.
   
   This is a step towards ZOOKEEPER-4472 which proposed to support 
`WatcherType.Persistent` and `WatcherType.PersistentRecursive` to remove 
persistent watchers.


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

Reply via email to