curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-33) Recursive Node Cache
Date Fri, 01 Aug 2014 18:51:39 GMT

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

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

Github user dragonsinth commented on the pull request:

    https://github.com/apache/curator/pull/17#issuecomment-50921130
  
    Just to be sure, I went back and instrumented the entire refresh() section like this:
    
    ```
            private void refresh() throws Exception
            {
                for ( int i = 0; i < 20; ++i )
                {
                    executorService.submit(new Callable<Void>()
                    {
                        @Override
                        public Void call() throws Exception
                        {
                            outstandingOps.addAndGet(2);
                            Thread.sleep(random.nextInt(30));
                            doRefreshData();
                            Thread.sleep(random.nextInt(30));
                            doRefreshChildren();
                            return null;
                        }
                    });
                }
            }
    
            private void doRefreshChildren() throws Exception
            {
                GetChildrenBuilder children1 = client.getChildren();
                Thread.sleep(random.nextInt(30));
                BackgroundPathable<List<String>> listBackgroundPathable = children1.usingWatcher(this);
                Thread.sleep(random.nextInt(30));
                Pathable<List<String>> listPathable = listBackgroundPathable.inBackground(this);
                Thread.sleep(random.nextInt(30));
                listPathable.forPath(path);
            }
    ```
    
    All the test still pass (just way more slowly) despite there being 20 threads racing each
other on every op.


> 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)

Mime
View raw message