You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2021/05/28 22:47:12 UTC

[GitHub] [zookeeper] hanm commented on a change in pull request #1491: ZOOKEEPER-3964: Introduce RocksDB snap and implement change data capture to enable incremental snapshot

hanm commented on a change in pull request #1491:
URL: https://github.com/apache/zookeeper/pull/1491#discussion_r641845588



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/DataTree.java
##########
@@ -585,15 +615,24 @@ public void deleteNode(String path, long zxid) throws KeeperException.NoNodeExce
                 parent.stat.setPzxid(zxid);
             }
             nodes.postChange(parentName, parent);
+
+            if (changeList != null) {
+                changeList.add(new TransactionChangeRecord(TransactionChangeRecord.DATANODE,
+                        TransactionChangeRecord.UPDATE, parentName, parent));
+            }
         }
 
         DataNode node = nodes.get(path);
         if (node == null) {
             throw new KeeperException.NoNodeException();
         }
         nodes.remove(path);
+        if (changeList != null) {
+            changeList.add(new TransactionChangeRecord(TransactionChangeRecord.DATANODE,

Review comment:
       This sounds a false negative. The changeList is a synchronized list and is thread safe.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org