alexguan / node-zookeeper-client

A pure Javascript ZooKeeper client for Node.js
Other
540 stars 147 forks source link

Fix listSubTreeBFS recursion. #126

Open alexmakarevich opened 1 year ago

alexmakarevich commented 1 year ago

Prior usage of async.reduce "faked recursion" by mutating the accumulator (referred to as "memo" by async). Newer versions of async disregard this mutation, breaking the functionality of listSubTreeBFS.

Here the method is rewritten with actual recursion.

alexmakarevich commented 1 year ago

Fixes #127

alexmakarevich commented 1 year ago

Hi @alexguan, would be very nice of you to take a look at this PR as it fixes a severe bug.

Recursive node removal is broken ATM, something else may be broken too, if it relies on listSubTreeBFS.