[ https://issues.apache.org/jira/browse/ZOOKEEPER-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161763#comment-13161763 ]
Patrick Hunt commented on ZOOKEEPER-1312: ----------------------------------------- What's the contract you're proposing for getChildrenWithStat? atomic? because if so that means locking all the child datanodes (large in your case) and holding all of those locks while you extract the name and stat information. Could really impact latency esp given one might have a large number of clients making this request (ie that's where it's interesting as a solution). You could relax the requirement, it would still require a lock for each DN but that would still be alot of locks. Also how interesting would this feature be for the user base at large if it was relaxed... 2) I believe we have a list of child names specifically to make getChildren fast. We just need to lock a single DN (the parent) and then copy the names. create/delete are amortized. 1) seems reasonable, but then there's the issue I mention earlier in this comment. 3) same issue as 1. 4) that could be potentially massive number of requests (clients X providers), guess it depends how fine grain the leases are. > Add a "getChildrenWithStat" operation > ------------------------------------- > > Key: ZOOKEEPER-1312 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1312 > Project: ZooKeeper > Issue Type: New Feature > Reporter: Daniel Lord > Labels: newbie > > It would be extremely useful to be able to have a "getChildrenWithStat" > method. This method would behave exactly the same as getChildren but in > addition to returning the list of all child znode names it would also return > a Stat for each child. I'm sure there are quite a few use cases for this but > it could save a lot of extra reads for my application. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira