rkhachatryan commented on code in PR #16582:
URL: https://github.com/apache/flink/pull/16582#discussion_r949214456


##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultCompletedCheckpointStore.java:
##########
@@ -133,17 +134,23 @@ public void addCheckpoint(
 
         completedCheckpoints.addLast(checkpoint);
 
-        CheckpointSubsumeHelper.subsume(
-                completedCheckpoints,
-                maxNumberOfCheckpointsToRetain,
-                completedCheckpoint ->
-                        tryRemoveCompletedCheckpoint(
-                                completedCheckpoint,
-                                
completedCheckpoint.shouldBeDiscardedOnSubsume(),
-                                checkpointsCleaner,
-                                postCleanup));
-
-        LOG.debug("Added {} to {}.", checkpoint, path);
+        Optional<CompletedCheckpoint> subsume =
+                CheckpointSubsumeHelper.subsume(
+                        completedCheckpoints,
+                        maxNumberOfCheckpointsToRetain,
+                        completedCheckpoint ->
+                                tryRemoveCompletedCheckpoint(
+                                        completedCheckpoint,
+                                        
completedCheckpoint.shouldBeDiscardedOnSubsume(),
+                                        checkpointsCleaner,
+                                        postCleanup));
+
+        if (subsume.isPresent()) {
+            LOG.debug("Added {} to {} without any older checkpoint to 
subsume.", checkpoint, path);
+        } else {
+            LOG.debug("Added {} to {} and subsume {}.", checkpoint, path, 
subsume);
+        }

Review Comment:
   Shouldn't it be the opposite?



-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to