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



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateWriter.java
##########
@@ -137,8 +137,9 @@ boolean isDone() {
 
        /**
         * Aborts the checkpoint and fails pending result for this checkpoint.
+        * @param cleanup true if {@link #getWriteResult(long)} is not supposed 
to be called afterwards.
         */
-       void abort(long checkpointId, Throwable cause);
+       void abort(long checkpointId, Throwable cause, boolean cleanup);

Review comment:
       > I guess the intend of cleanup is to avoid throwing an exception if 
getWriteResult(long) is called nonetheless, right?
   
   Yes.
   
   > So in which cases can that happen?
   
   `abort` with `cleanup=false` can be called when:
   1. receiving abort notification via RPC
   2. `CheckpointBarrierUnaligner.allBarriersReceivedFuture` is cancelled
   
   > Do we ensure cleanup in these cases (e.g., is abort then called twice?)?
   
   Yes, for each checkpoint either "regular" `abort` or `getWriteResult` is 
eventually called.




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