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



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SubtaskCheckpointCoordinatorImpl.java
##########
@@ -158,6 +159,16 @@ private ChannelStateWriter openChannelStateWriter() {
        @Override
        public void abortCheckpointOnBarrier(long checkpointId, Throwable 
cause, OperatorChain<?, ?> operatorChain) throws IOException {
                LOG.debug("Aborting checkpoint via cancel-barrier {} for task 
{}", checkpointId, taskName);
+               lastCheckpointId = Math.max(lastCheckpointId, checkpointId);
+               Iterator<Long> iterator = abortedCheckpointIds.iterator();
+               while (iterator.hasNext()) {
+                       long next = iterator.next();
+                       if (next < lastCheckpointId) {
+                               iterator.remove();
+                       } else {
+                               break;
+                       }
+               }

Review comment:
       This is just an optimization.




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