tillrohrmann commented on a change in pull request #7880: [FLINK-11336][zk] 
Delete ZNodes when ZooKeeperHaServices#closeAndCleanupAllData
URL: https://github.com/apache/flink/pull/7880#discussion_r261990026
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/zookeeper/ZooKeeperHaServices.java
 ##########
 @@ -225,6 +227,12 @@ public void closeAndCleanupAllData() throws Exception {
                        exception = t;
                }
 
+               try {
+                       cleanupZooKeeperPaths();
 
 Review comment:
   I think `cleanupZooKeeperPaths` and `ZKPaths#deleteChildren` is not 
equivalent. On top of deleting the cluster id znode with all its children, we 
try to delete all parent nodes which might have been created when starting 
ZooKeeper. This should fail, if there is a parent with a remaining child 
because this indicates that this znode is still in use. Moreover, in 
`deleteOwnedZNode` we call 
`client.delete().deletingChildrenIfNeeded().forPath("/")` which is the same as 
`ZKPaths#deleteChildren`. The logic of deleting the parent nodes could be 
removed once we upgrade to ZooKeeper >= 3.5.1 which adds support for container 
nodes.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to