[ https://issues.apache.org/jira/browse/ZOOKEEPER-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13868078#comment-13868078 ]
Rakesh R commented on ZOOKEEPER-442: ------------------------------------ [~rgs] thanks again for the review and comments. {quote} I think we should just throw NoWatcherException otherwise how can the caller of this (async) method know if it failed to be scheduled? I think this is how other async methods behave when the remote call fails to be issued. They either raise an exception or return an error code instead of having their callback being called. The callback should only be called if the remote call was performed (so then it only gets server generated errors, if any). {quote} In that case, here we should have throws KeeperException clause for the removeWatch async api. But I couldn't see any such async api which is throwing KeeperException. This validation is just to avoid server call and do fail-fast. I think this will not see as a deviation for the async behavior. If you agree with my point, I'll leave this part alone and fix other comments ? > 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: Sub-task > Components: java client, server > Reporter: Benjamin Reed > Assignee: Rakesh R > Priority: Critical > Fix For: 3.5.0 > > Attachments: Remove Watch API.pdf, ZOOKEEPER-442.patch, > ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, ZOOKEEPER-442.patch, > 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 was sent by Atlassian JIRA (v6.1.5#6160)