[
https://issues.apache.org/jira/browse/CURATOR-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14056946#comment-14056946
]
Scott Blum edited comment on CURATOR-33 at 7/10/14 12:23 AM:
-------------------------------------------------------------
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 serious 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.
was (Author: dragonsinth):
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)