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



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SubtaskCheckpointCoordinatorImpl.java
##########
@@ -183,6 +209,41 @@ public void notifyCheckpointComplete(long checkpointId, 
OperatorChain<?, ?> oper
                
env.getTaskStateManager().notifyCheckpointComplete(checkpointId);
        }
 
+       @Override
+       public void notifyCheckpointAborted(long checkpointId, OperatorChain<?, 
?> operatorChain, Supplier<Boolean> isRunning) throws Exception {
+
+               if (isRunning.get()) {
+                       LOG.debug("Notification of aborted checkpoint for task 
{}", taskName);
+                       // only happens when the task always received 
checkpoints to abort but never trigger or executing.
+                       if (abortedCheckpointIds.size() >= 
DEFAULT_MAX_RECORDED_ABOTRED_CHECKPOINTS) {
+                               abortedCheckpointIds.pollFirst();
+                       }
+
+                       boolean canceled = 
closeableRegistry.cancelAsyncCheckpointRunnable(checkpointId);

Review comment:
       Thanks for your clarification, I would also try to call 
`ChannelStateWriter#abort` during 
`SubtaskCheckpointCoordinator#notifyCheckpointAborted` and add logic to verify 
this in unit test.




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