zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gunnar Wagenknecht (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-442) need a way to remove watches that are no longer of interest
Date Fri, 01 Jul 2011 12:08:28 GMT

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

Gunnar Wagenknecht commented on ZOOKEEPER-442:

This is getting critical in our environment. From a heap dump we recognized that the {{HashMap}}
with all the values was very large and consumed ~70% of the heap (~3 million entries, collected
over just a few days, ~8 million capacity). 

Our usage patter might be wrong, though. I'm setting an exists watch in order to wait for
a node to be deleted within a certain timeout. The watch contains a CountDownLatch which allows
me to sleep until the watch triggers or the timeout triggers. in the latter case I really
need to remove the watch.

A workaround would be to not set a watch at all and just sleep for a while and check in a
loop. However, that would increase the read traffic to ZooKeeper dramatically.

Any ideas?

> 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
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message