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

Nitay Joffe commented on ZOOKEEPER-272:
---------------------------------------

What about having getChildren() return an Iterator<String> instead of a 
List<String>? Using such an abstraction allows us to put the implementation 
details of what "walking the list children" mean inside ZooKeeper instead of 
client code. With an Iterator we can make the next() call handle the multiple 
offset getChildren() calls under the hood, rather than put this burden on the 
client. Furthermore, if we have, say, some compressed protocol, a lot of 
space/cpu can be saved by only decompressing/storing the current child being 
worked on.

> getChildren can fail for large numbers of children
> --------------------------------------------------
>
>                 Key: ZOOKEEPER-272
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-272
>             Project: Zookeeper
>          Issue Type: Bug
>            Reporter: Joshua Tuberville
>            Assignee: Mahadev konar
>             Fix For: 3.1.0
>
>         Attachments: ZOOKEEPER-272.patch
>
>
> Zookeeper allows creation of an abritrary number of children, yet if the 
> String array of children names exceeds 4,194,304 bytes a getChildren will 
> fail because ClientCnxn$SendThread.readLength() throws an exception on line 
> 490.  Mahadev Konar questioned this byte limit's need.  In any case 
> consistency of create children, get children should exist.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to