Myasuka commented on a change in pull request #12470:
URL: https://github.com/apache/flink/pull/12470#discussion_r435691165



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -919,9 +920,33 @@ public final ExecutorService 
getAsyncOperationsThreadPool() {
 
        @Override
        public Future<Void> notifyCheckpointCompleteAsync(long checkpointId) {
-               return 
mailboxProcessor.getMailboxExecutor(TaskMailbox.MAX_PRIORITY).submit(
-                               () -> notifyCheckpointComplete(checkpointId),
-                               "checkpoint %d complete", checkpointId);
+               return notifyCheckpointOperation(
+                       () -> notifyCheckpointComplete(checkpointId),
+                       String.format("checkpoint %d complete", checkpointId));
+       }
+
+       @Override
+       public Future<Void> notifyCheckpointAbortAsync(long checkpointId) {
+               return notifyCheckpointOperation(
+                       () -> 
subtaskCheckpointCoordinator.notifyCheckpointAborted(checkpointId, 
operatorChain, this::isRunning),
+                       String.format("checkpoint %d aborted", checkpointId));
+       }
+
+       private Future<Void> notifyCheckpointOperation(RunnableWithException 
runnable, String description) {

Review comment:
       `triggerCheckpointAsync` need to return `Future<Boolean>` while those 
operators just return `Future<Void>`. If we decide to change interfaces in 
`AbstractInvokable` to return both `Future<Boolean>`, I think this method could 
be re-used.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to