This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch branch-3.6
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/branch-3.6 by this push:
     new 001ed3b  ZOOKEEPER-3763: Restore ZKUtil.deleteRecursive in order to 
help compatibility of applications with 3.5 and 3.6
001ed3b is described below

commit 001ed3bd069a9aa176d2ac62467edc92297986ed
Author: Enrico Olivelli <[email protected]>
AuthorDate: Sun Mar 22 14:47:08 2020 +0100

    ZOOKEEPER-3763: Restore ZKUtil.deleteRecursive in order to help 
compatibility of applications with 3.5 and 3.6
    
    Author: Enrico Olivelli <[email protected]>
    
    Reviewers: Christopher Tubbs, Norbert Kalmar <[email protected]>, Mate 
Szalay-Beko
    
    Closes #1287 from eolivelli/fix/ZOOKEEPER-3763-compat
    
    (cherry picked from commit bb80b813d79b0eff93d112d6d15f00c147d946c1)
    Signed-off-by: Enrico Olivelli <[email protected]>
---
 .../src/main/java/org/apache/zookeeper/ZKUtil.java           | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java 
b/zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java
index 481f8e9..98a2656 100644
--- a/zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java
+++ b/zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java
@@ -64,6 +64,18 @@ public class ZKUtil {
         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;

Reply via email to