Skip to content

Commit

Permalink
ZOOKEEPER-3763: Restore ZKUtil.deleteRecursive in order to help compa…
Browse files Browse the repository at this point in the history
…tibility of applications with 3.5 and 3.6

Author: Enrico Olivelli <[email protected]>

Reviewers: Christopher Tubbs, Norbert Kalmar <[email protected]>, Mate Szalay-Beko

Closes apache#1287 from eolivelli/fix/ZOOKEEPER-3763-compat
  • Loading branch information
Enrico Olivelli authored and RokLenarcic committed Aug 31, 2022
1 parent 18d7e19 commit bf9dd3a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ public static boolean deleteRecursive(
return deleteInBatch(zk, tree, batchSize);
}

/**
* Same as {@link #deleteRecursive(org.apache.zookeeper.ZooKeeper, java.lang.String, int)
* kept here for compatibility with 3.5 clients.
*
* @since 3.6.1
*/
public static void deleteRecursive(
ZooKeeper zk,
final String pathRoot) throws InterruptedException, KeeperException {
deleteRecursive(zk, pathRoot, 1000);
}

private static class BatchedDeleteCbContext {

public Semaphore sem;
Expand Down

0 comments on commit bf9dd3a

Please sign in to comment.