zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Hunt (JIRA)" <j...@apache.org>
Subject [jira] Commented: (ZOOKEEPER-44) DataTree does not use natural sort for getChildren
Date Wed, 11 Jun 2008 16:22:45 GMT

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

Patrick Hunt commented on ZOOKEEPER-44:
---------------------------------------

My personal preference would be to leave it unsorted and let the client sort if needed. That
way you only pay the perf penalty if you need the children sorted. Either way we should address
this -- remove the unnecessary sort and make sure to document that the results are unsorted.

> DataTree does not use natural sort for getChildren
> --------------------------------------------------
>
>                 Key: ZOOKEEPER-44
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-44
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.0.0
>            Reporter: Stu Hood
>            Priority: Minor
>
> DataTree.getChildren() performs Collection.sort() on the list of children before returning
it, but Java's default comparator for Strings will sort 'lock-20' before 'lock-3' for instance.


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


Mime
View raw message