Myasuka commented on a change in pull request #16582:
URL: https://github.com/apache/flink/pull/16582#discussion_r677283450
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -1243,6 +1250,29 @@ private void completePendingCheckpoint(PendingCheckpoint
pendingCheckpoint)
CheckpointFailureReason.FINALIZE_CHECKPOINT_FAILURE,
exception);
}
+
+ try {
+
allPreviousCheckpoints.removeAll(completedCheckpointStore.getAllCheckpoints());
+ if (!allPreviousCheckpoints.isEmpty()) {
Review comment:
I think we can refer to the documentation of
`CompletedCheckpointStore#addCheckpoint`:
~~~ java
Only a bounded number of checkpoints is kept. When exceeding the maximum
number of
retained checkpoints, the oldest one will be discarded.
~~~
And all current implementations obey this role to make this method atomic
and discard the oldest checkpoint internally. That's why, to me, changing this
method to return the oldest discarded checkpoint looks so straightforward.
--
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]