akalash commented on a change in pull request #18845:
URL: https://github.com/apache/flink/pull/18845#discussion_r816666503



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StandaloneCompletedCheckpointStore.java
##########
@@ -133,7 +133,13 @@ public void shutdown(JobStatus jobStatus, 
CheckpointsCleaner checkpointsCleaner)
 
             long lowestRetained = Long.MAX_VALUE;
             for (CompletedCheckpoint checkpoint : checkpoints) {
-                if (!checkpoint.discardOnShutdown(jobStatus)) {
+                if (checkpoint.shouldBeDiscardedOnShutdown(jobStatus)) {
+                    checkpoint.markAsDiscardedOnShutdown(jobStatus).discard();

Review comment:
       I don't fully sure about this place since the condition for OnShutdown 
checks twice in `shouldBeDiscardedOnShutdown` and `markAsDiscardedOnShutdown` 
it is possible instead of `markAsDiscardedOnShutdown` use `markAsDiscarded` but 
I would like to have consistency with `markAsDiscardedOnSubsume` and also I 
still want to encapsulate this logic somewhere to avoid the possible problem in 
the future.




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