curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jordan Zimmerman (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CURATOR-14) Memory leak in Curator watches
Date Tue, 04 Jun 2013 18:01:24 GMT

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

Jordan Zimmerman edited comment on CURATOR-14 at 6/4/13 6:00 PM:
-----------------------------------------------------------------

>Regarding the WatcherKey, do u see it as a way of wrapping Watcher/CuratorWatcher objects
or you think that the recipes should directly use anonymous inner implementations of the WatcherKey?
Yes. The idea is to have a semi-opaque type that isn't accepted in any Curator/ZooKeeper API.
This way, the user can't make a mistake. What do you think?

Thinking about this more - I wonder if we could hide the WatcherMap altogether inside of Curator.
Extend with usingWatcher() semantics to take a WatcherKey instance. This would be translated
internally into a WatcherMapped instance. I haven't thought this through. What do you think?
                
      was (Author: randgalt):
    >Regarding the WatcherKey, do u see it as a way of wrapping Watcher/CuratorWatcher
objects or you think that the recipes should directly use anonymous inner implementations
of the WatcherKey?
Yes. The idea is to have a semi-opaque type that isn't accepted in any Curator/ZooKeeper API.
This way, the user can't make a mistake. What do you think?
                  
> Memory leak in Curator watches
> ------------------------------
>
>                 Key: CURATOR-14
>                 URL: https://issues.apache.org/jira/browse/CURATOR-14
>             Project: Apache Curator
>          Issue Type: New Feature
>          Components: Recipes
>    Affects Versions: 2.0.0-incubating
>            Reporter: Brandon Beck
>            Priority: Minor
>         Attachments: CURATOR-14-draft-2.patch, CURATOR-14-draft-3.patch, CURATOR-14.patch,
MemoryTest.java
>
>
> The JVM runs out of memory if you repetitively create a PathChildrenCache, start it then
immediately stop it.  It appears that the memory is taken up by a watch that isn't ever cleaned
up.  Curator attempts to do some pooling of watches, but doesn't seem to use the path in the
pooling.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message