zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #647: ZOOKEEPER-3125: Fixing pzxid consistent issue w...
Date Fri, 28 Sep 2018 09:56:21 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/647#discussion_r221200308
  
    --- Diff: src/java/main/org/apache/zookeeper/server/DataTree.java ---
    @@ -527,6 +527,24 @@ public void deleteNode(String path, long zxid)
             int lastSlash = path.lastIndexOf('/');
             String parentName = path.substring(0, lastSlash);
             String childName = path.substring(lastSlash + 1);
    +
    +        // The child might already be deleted during taking fuzzy snapshot,
    +        // but we still need to update the pzxid here before throw exception
    +        // for no such child
    +        DataNode parent = nodes.get(parentName);
    +        if (parent == null) {
    +            throw new KeeperException.NoNodeException();
    +        }
    +        synchronized (parent) {
    +            parent.removeChild(childName);
    +            // Only update pzxid when the zxid is larger than the current pzxid,
    +            // otherwise we might override higher pzxid set by a following create 
    +            // Txn, which could cause the cversion and pzxid inconsistent
    +            if (zxid > parent.stat.getPzxid()) {
    --- End diff --
    
    Looks like this is the fix you're talking about and which will be fixed separately in
3.6. Is that correct?


---

Mime
View raw message