dmvk commented on a change in pull request #17693:
URL: https://github.com/apache/flink/pull/17693#discussion_r745432719
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PendingCheckpoint.java
##########
@@ -336,6 +336,8 @@ public CompletedCheckpoint finalizeCheckpoint(
props,
finalizedLocation);
+ // Mark this pending checkpoint as disposed, but do NOT drop
the state.
+ dispose(false, checkpointsCleaner, postCleanup, executor);
Review comment:
Sure:
- During scheduler cleanup, checkpoint cleaner gets closed right after all
of the checkpoint futures complete [1]
- CheckpointsCleaner close future completes when all of the async disposals
are finished (all data are removed). This uses a simple counter
(`numberOfCheckpointsToClean`) to track pending disposals.
- We're not allowed to register new disposals after
CheckpointsCleaner#closeAsync has been called
- Calling #dispose() tries to register a new disposal with
CheckpointsCleaner [2]
-> We need to register all disposals before closing the checkpointsCleaner
[1]
https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java#L606
[2]
https://github.com/apache/flink/blob/master/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointsCleaner.java#L106
--
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]