XComp commented on pull request #19191: URL: https://github.com/apache/flink/pull/19191#issuecomment-1074014269
> Why is the recursive ZK deletion not necessary? The `ZooKeeperCheckpointRecoveryFactory` is instantiated in [AbstractZooKeeperHaServices:67](https://github.com/apache/flink/blob/8ddfd590ebba7fc727e79db41b82d3d40a02b56a/flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/zookeeper/AbstractZooKeeperHaServices.java#L67) and specifies `/jobs` as the "namespace" under the Flink cluster node. The `ZooKeeperCheckpointRecoveryFactory` instantiates the `ZooKeeperCheckpointIDCounter` in [ZooKeeperCheckpointRecoveryFactory:71](https://github.com/apache/flink/blob/50be2480b29da6fb21d7033a86bef08b6a4a2ea5/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointRecoveryFactory.java#L71) with `/<job-id>` as the subpath on top of `/jobs`. This leaves the namespace of the client used in `ZooKeeperCheckpointIDCounter` with `/flink/<cluster-id>/jobs/<job-id>/` and the path for the actual counter being `/checkpoint_id_counter` in [ZooKeeperCheckpointIDCounter:92](https://github.com/apache/flink/blob/e85acd0bdb48c89f65bfa0287b21b0286a2afacb/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/ZooKeeperCheckpointIDCounter.java#L92). The ZooKeeperCheckpointIDCounter uses a [SharedCount](https://github.com/apache/curator/blob/master/curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedCount.java) which internally uses a [SharedValue](https://github.com/apache/curator/blob/master/curator-recipes/src/main/java/org/apache/curator/framework/recipes/shared/SharedValue.java). The `SharedValue` doesn't add any children, either. But I agree, that there's a risk that I overlooked something. It just felt consistent and enabled me to test the shutdown mechanism with an actual failure cause. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
