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 2021/08/11 07:38:59 UTC
[GitHub] [flink] dmvk commented on a change in pull request #16652: [FLINK-22483][flink-runtime] Remove CompletedCheckpointStore#recover(…
dmvk commented on a change in pull request #16652:
URL: https://github.com/apache/flink/pull/16652#discussion_r686577521
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/DefaultCompletedCheckpointStore.java
##########
@@ -95,18 +86,14 @@ public DefaultCompletedCheckpointStore(
int maxNumberOfCheckpointsToRetain,
StateHandleStore<CompletedCheckpoint, R> stateHandleStore,
CheckpointStoreUtil completedCheckpointStoreUtil,
+ Collection<CompletedCheckpoint> completedCheckpoints,
Executor executor) {
-
checkArgument(maxNumberOfCheckpointsToRetain >= 1, "Must retain at least one checkpoint.");
-
this.maxNumberOfCheckpointsToRetain = maxNumberOfCheckpointsToRetain;
-
this.checkpointStateHandleStore = checkNotNull(stateHandleStore);
-
this.completedCheckpoints = new ArrayDeque<>(maxNumberOfCheckpointsToRetain + 1);
-
+ this.completedCheckpoints.addAll(completedCheckpoints);
Review comment:
That's a good idea. I'll add a safeguard to `DefaultCompletedCheckpointStore#addCheckpoint`, that should be only method that can mutate its state.
--
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