edu05 commented on a change in pull request #16652:
URL: https://github.com/apache/flink/pull/16652#discussion_r686354607



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/EmbeddedCompletedCheckpointStore.java
##########
@@ -35,23 +36,24 @@
 
     private final ArrayDeque<CompletedCheckpoint> checkpoints = new 
ArrayDeque<>(2);
 
-    private final Collection<CompletedCheckpoint> suspended = new 
ArrayDeque<>(2);
+    private final Collection<CompletedCheckpoint> suspended =
+            Collections.synchronizedList(new ArrayList<>());
 
     private final int maxRetainedCheckpoints;
 
     public EmbeddedCompletedCheckpointStore() {
         this(1);
     }
 
-    EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints) {
-        Preconditions.checkArgument(maxRetainedCheckpoints > 0);
-        this.maxRetainedCheckpoints = maxRetainedCheckpoints;
+    public EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints) {
+        this(maxRetainedCheckpoints, Collections.emptyList());

Review comment:
       why remove the precondition?




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