rkhachatryan commented on a change in pull request #15000:
URL: https://github.com/apache/flink/pull/15000#discussion_r582011661



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointType.java
##########
@@ -48,10 +54,29 @@ public boolean isSavepoint() {
     }
 
     public boolean isSynchronous() {
-        return isSynchronous;
+        return postCheckpointAction != PostCheckpointAction.NONE;
+    }
+
+    public PostCheckpointAction getPostCheckpointAction() {
+        return postCheckpointAction;
+    }
+
+    public boolean shouldAdvanceToEndOfTime() {
+        return getPostCheckpointAction() == PostCheckpointAction.TERMINATE;
+    }
+
+    public boolean shouldIgnoreEndOfInput() {
+        return getPostCheckpointAction() == PostCheckpointAction.SUSPEND;

Review comment:
       nit:
   I think ignoring EndOfInput is a task-level implementation detail, it 
shouldn't be in `CheckpointType`.
   Moving it to `StreamTask` closer to `isSynchronous` check would make the 
purpose more clear to me.




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