[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179375#comment-13179375
 ] 

[email protected] commented on ZOOKEEPER-442:
---------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3364/
-----------------------------------------------------------

Review request for zookeeper and Benjamin Reed.


Summary
-------

Added APIs to remove watches that are not needed anymore. If the removal 
completes successfully it is guaranteed that the watcher won't be notified.

With the current semantics if two clients remove watches on a znode at the same 
time the watch is triggered, one could remove it successfully while the other 
could receive the notification first.


This addresses bug ZOOKEEPER-442.
    https://issues.apache.org/jira/browse/ZOOKEEPER-442


Diffs
-----

  src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 
  src/java/main/org/apache/zookeeper/KeeperException.java 7c10d2c 
  src/java/main/org/apache/zookeeper/Watcher.java 36c7b5b 
  src/java/main/org/apache/zookeeper/ZooDefs.java c7f1b20 
  src/java/main/org/apache/zookeeper/ZooKeeper.java e82eaa0 
  src/java/main/org/apache/zookeeper/server/DataTree.java 757a572 
  src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 336827a 
  src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java 1a80d74 
  src/java/main/org/apache/zookeeper/server/Request.java c6a2249 
  src/java/main/org/apache/zookeeper/server/WatchManager.java 0e7c815 
  src/java/main/org/apache/zookeeper/server/ZKDatabase.java 2842803 
  src/java/test/org/apache/zookeeper/test/RemoveWatchesTest.java PRE-CREATION 
  src/zookeeper.jute d24e145 

Diff: https://reviews.apache.org/r/3364/diff


Testing
-------

Added unit test that checks client side semantics.


Thanks,

Daniel


                
> need a way to remove watches that are no longer of interest
> -----------------------------------------------------------
>
>                 Key: ZOOKEEPER-442
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-442
>             Project: ZooKeeper
>          Issue Type: Improvement
>            Reporter: Benjamin Reed
>            Assignee: Daniel Gómez Ferro
>            Priority: Critical
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, 
> ZOOKEEPER-442.patch, ZOOKEEPER-442.patch
>
>
> currently the only way a watch cleared is to trigger it. we need a way to 
> enumerate the outstanding watch objects, find watch events the objects are 
> watching for, and remove interests in an event.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to