curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Blum (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-33) Recursive Node Cache
Date Thu, 10 Jul 2014 00:24:05 GMT

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

Scott Blum commented on CURATOR-33:
-----------------------------------

It's possible I'm missing something serious, but in the copy of the patch I got, the new "rebuild(String
root)" is not being called anywhere, and refresh is only getting called on the root path.

- I don't see where child watches are getting setup on anything other than the root node;
you'd need to add a child watch to every node in the entire tree.  testCacheWholeTree() is
failing because it never gets a creation event for any nested subnodes, which is as I would
expect due to not setting up child listeners on children.

- I would expect that RefreshOperation would need a new "path" field to say what part of the
tree needs to be refreshed when some subnode changes.

- processChildren() would need some seriously kung-fu to handle currentData updates on subnodes.
 For example, if you got an update that node "test/1" has a child "2", the current code would
remove all data for all nodes in the entire tree except for "test/1/2"; it needs to remove
only children of "test/1".  This would be inefficient given that currentData is a flat hashmap
rather than a tree-like structure where an entire subtree could be pruned in one go.


> 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
>             Fix For: awaiting-response
>
>         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