You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/08/18 14:29:51 UTC

[GitHub] [flink] rkhachatryan commented on a diff in pull request #16582: [FLINK-21504][checkpoint] Introduce notification of subsumed checkpoint

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-unsubscribe@flink.apache.org

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