curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-430) deletingChildrenIfNeeded maybe cannot delete children completely when multi-client delete concurrently
Date Tue, 15 Aug 2017 23:28:01 GMT

    [ https://issues.apache.org/jira/browse/CURATOR-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128056#comment-16128056
] 

ASF GitHub Bot commented on CURATOR-430:
----------------------------------------

Github user lvfangmin commented on a diff in the pull request:

    https://github.com/apache/curator/pull/235#discussion_r133328503
  
    --- Diff: curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java ---
    @@ -313,7 +313,13 @@ public static void deleteChildren(ZooKeeper zookeeper, String path,
boolean dele
         {
             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
    --- End diff --
    
    // someone else has deleted the node since we checked


> deletingChildrenIfNeeded maybe cannot delete children completely when multi-client delete
concurrently
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CURATOR-430
>                 URL: https://issues.apache.org/jira/browse/CURATOR-430
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Client
>            Reporter: hebelala
>
> use curatorFramework.delete().deletingChildrenIfNeeded().forPath(path), this sync api
doesn't ignore the NoNodeException, causes the rest of children nodes will not be deleted
perhaps.
> zookeeper.getChildren(path, null) maybe throw NoNodeException, if the path doesn't exist.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message