Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Won't Do
-
None
-
None
-
ZOOKEEPER-3402already implemented a more general approach which solves this issue as well.
Description
There is already a multi operation for delete, create, setData... However, getChildren has no version of getting the children of multiple nodes by one message.
This could heavily improve the efficiency of a traversal (e.g. breadth-first search) when the latency is high (>1ms). In this case, a simple deleteAll algorithm on 10k nodes takes at least (1ms * 10000 * 2 =) 20 sec, only to acquire the list of the nodes selected for deleting (it has to check for every node whether it has children or not).
I would add a version of getChildren function to the ZooKeeper API which accepts lists as well (containing node paths) and returns their children and introduce a new request type. This way the backward compabilty would not be hurt but ZK could provide a more robust solution for those who may have latency issues.
Attachments
Issue Links
- Dependent
-
ZOOKEEPER-3374 Use MultiRead operation in the BFS utility
- Open
- links to