You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2017/09/24 20:56:16 UTC
[4/9] curator git commit: Fix,
maybe cannot deleteChildren completely when multi-client delete
concurrently
Fix, maybe cannot deleteChildren completely when multi-client delete concurrently
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/ca1e9fbb
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/ca1e9fbb
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/ca1e9fbb
Branch: refs/heads/master
Commit: ca1e9fbbb28a9deaa7f6187f321fd446f471db6d
Parents: 15eb063
Author: hebelala <he...@qq.com>
Authored: Fri Aug 11 18:39:21 2017 +0800
Committer: hebelala <he...@qq.com>
Committed: Fri Aug 11 18:39:21 2017 +0800
----------------------------------------------------------------------
.../src/main/java/org/apache/curator/utils/ZKPaths.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/ca1e9fbb/curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java b/curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java
index 17fa913..91e65ea 100644
--- a/curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java
+++ b/curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java
@@ -313,7 +313,13 @@ public class ZKPaths
{
PathUtils.validatePath(path);
- List<String> children = zookeeper.getChildren(path, null);
+ List<String> children;
+ try {
+ children = zookeeper.getChildren(path, null);
+ } catch (KeeperException.NoNodeException e) {
+ // someone else has deleted the node it since we checked
+ return;
+ }
for ( String child : children )
{
String fullPath = makePath(path, child);