StephanEwen commented on a change in pull request #14186:
URL: https://github.com/apache/flink/pull/14186#discussion_r529486181



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
##########
@@ -1338,14 +1368,23 @@ private boolean restoreLatestCheckpointedStateInternal(
                        CompletedCheckpoint latest = 
completedCheckpointStore.getLatestCheckpoint(isPreferCheckpointForRecovery);
 
                        if (latest == null) {
+                               LOG.info("No checkpoint found during restore.");
+
                                if (errorIfNoCheckpoint) {
                                        throw new IllegalStateException("No 
completed checkpoint available");
-                               } else {
+                               }
+
+                               if (coordinatorRestoreBehavior == 
CoordinatorRestore.ALWAYS) {

Review comment:
       If this becomes `if (coordinatorRestoreBehavior == RESTORE_OR_RESET)` 
then this looks good, I think.
   It is also more about "no checkpoint" than "no state". "No state" can also 
be the case if there is a checkpoint.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to