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

Hongchao Deng commented on ZOOKEEPER-1962:
------------------------------------------

hi [~ggop],

Great idea and nice work.

I wanna share a caveat I found and a few other comments for the patch:

h1. Race condition
The following situation could break your code:
Original it is

{code}
/a, /a/b, /a/b/c
{code}

Now the code calls

{code}
zk.getChildren("/a/b", false)
{code}

but some other threads
{code}
delete /a
{code}
before.

The code will throw an exception.

You have to capture it. A nice thing to do is notify the user. Or ignore things 
under this path.

> Add a CLI command to recursively list a znode and children
> ----------------------------------------------------------
>
>                 Key: ZOOKEEPER-1962
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1962
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: java client
>    Affects Versions: 3.4.6
>            Reporter: Gautam Gopalakrishnan
>            Assignee: Gautam Gopalakrishnan
>            Priority: Minor
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1962.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> When troubleshooting applications where znodes can be multiple levels deep  
> (eg. HBase replication), it is handy to see all child znodes recursively 
> rather than run an ls for each node manually.
> So I propose adding an option to the "ls" command (-r) which will list all 
> child nodes under a given znode. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to