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

Daniel Lord commented on ZOOKEEPER-1312:
----------------------------------------

I think it would have to be atomic in order to remain consistent and generally 
useful.  I certainly have a different set of requirements for this call but I 
don't think that it makes sense to loosen the strong atomicity and consistency 
guarantees in order to satisfy my requirements on this.  I think, as Patrick 
has alluded to, that my project is on a considerably larger scale than most 
users and having an atomic operation is potentially not as expensive for other 
users.

As far as #2 goes I'm not sure that should make much of a difference.  At least 
not with respect to locking.  Since a node can't change names as soon as you 
acquire the lock on the parent DataNode no children can be added or removed.  
This means that you could calculate the names without locking each individual 
child DataNode right?

As far as the locking problem goes is the real concern here over the contention 
of locks from multiple clients reading?  If so moving to a read/write lock 
might be appropriate.  That's starting to push the scope a bit but I'm just 
interested in exploring the issues/concerns that people have.  This approach is 
definitely not the only one that is out there but it is, at the moment, the 
most attractive to me.
                
> 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

        

Reply via email to