[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kezhu Wang updated ZOOKEEPER-4471:
----------------------------------
    Release Note: Previously, removing WatcherType::Data or 
WatcherType::Children from AddWatchMode::Persistent will succeed in server side 
and 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 and neither intend to do such "compute" in server side, so we decide 
to forbid this behavior. Such operation resulted in NOWATCHER in Java client 
anyway.  (was: Previously, removing {{WatcherType::Data}} or 
{{WatcherType::Children}} from {{AddWatchMode::Persistent}} will succeed in 
server side and 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 and neither intend to do such "compute" in server side, 
so we decide to forbid this behavior. Such operation resulted in {{NOWATCHER}} 
in Java client anyway.)

> 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.6.3, 3.7.0
>            Reporter: Kezhu Wang
>            Assignee: Kezhu Wang
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 3.9.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> {{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.10#820010)

Reply via email to