fredia commented on code in PR #19448:
URL: https://github.com/apache/flink/pull/19448#discussion_r874950094


##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultCompletedCheckpointStore.java:
##########
@@ -137,23 +134,19 @@ public CompletedCheckpoint 
addCheckpointAndSubsumeOldestOne(
 
         completedCheckpoints.addLast(checkpoint);
 
+        // Register checkpoint to SharedStateRegistry, and checkpoint would be 
discarded during
+        // unregistering.
+        getSharedStateRegistry().registerCompletedCheckpoint(checkpoint);
+
+        // Remove completed checkpoint from queue and 
checkpointStateHandleStore, not discard.
         Optional<CompletedCheckpoint> subsume =
                 CheckpointSubsumeHelper.subsume(
                         completedCheckpoints,
                         maxNumberOfCheckpointsToRetain,
-                        completedCheckpoint ->
-                                tryRemoveCompletedCheckpoint(
-                                        completedCheckpoint,
-                                        
completedCheckpoint.shouldBeDiscardedOnSubsume(),
-                                        checkpointsCleaner,
-                                        postCleanup));
+                        completedCheckpoint -> 
tryRemove(completedCheckpoint.getCheckpointID()));

Review Comment:
   Yes, it is a duplicate call to cleanup checkpoint.  I pass an empty subsume 
action to `unregisterUnusedState` to avoid duplicate cleanup.



-- 
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]

Reply via email to