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/04/08 10:43:56 UTC

[GitHub] [flink] XComp commented on a diff in pull request #19331: [FLINK-26985][runtime] Don't discard shared state of restored checkpoints

XComp commented on code in PR #19331:
URL: https://github.com/apache/flink/pull/19331#discussion_r845984535


##########
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/cleanup/CheckpointResourcesCleanupRunner.java:
##########
@@ -118,7 +119,11 @@ public void start() throws Exception {
     }
 
     private void cleanupCheckpoints() throws Exception {
-        final CompletedCheckpointStore completedCheckpointStore = createCompletedCheckpointStore();
+        final CompletedCheckpointStore completedCheckpointStore =
+                // Using RestoreMode.CLAIM to be able to discard shared state, if any
+                // Note that it also means that the original shared state might be discarded as well
+                // because the initial checkpoint might be subsumed.
+                createCompletedCheckpointStore(RestoreMode.CLAIM);

Review Comment:
   Could we move the `RestoreMode` into the private method `createCompletedCheckpointStore`? At least, I don't see a reason to introduce a parameter here...



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