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

ASF GitHub Bot commented on CURATOR-33:
---------------------------------------

Github user dragonsinth commented on the pull request:

    https://github.com/apache/curator/pull/17#issuecomment-50917378
  
    Okay, the outstandingOps race was easy to resolve, I'm changing refresh() 
to do this:
    
    ```
    private void refresh() throws Exception
    {
        // Push an extra op so that a race between refreshData() response and
        // refreshChildren() can't cause the outstanding ops to drop to zero.
        try {
            outstandingOps.incrementAndGet();
            refreshData();
            refreshChildren();
        } finally {
            outstandingOps.decrementAndGet();
        }
    }
    ```
    
    With this I can add a Thread.sleep() at that start of refreshChildren() and 
there's no problem.


> Recursive Node Cache
> --------------------
>
>                 Key: CURATOR-33
>                 URL: https://issues.apache.org/jira/browse/CURATOR-33
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Recipes
>            Reporter: John Vines
>            Assignee: Jordan Zimmerman
>             Fix For: TBD
>
>         Attachments: CURATOR-33.2.patch, CURATOR-33.patch
>
>
> Currently the PathChildrenCache will trigger listen events for all children 
> at the given node. However, it would be useful to have a cache that would 
> trigger listen events for the entire hierarchy below the given node.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to