Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2754#discussion_r87043464
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/BarrierBuffer.java
 ---
    @@ -135,19 +138,20 @@ else if (next.getEvent().getClass() == 
CheckpointBarrier.class) {
                                                
processBarrier((CheckpointBarrier) next.getEvent(), next.getChannelIndex());
                                        }
                                }
    +                           else if (next.getEvent().getClass() == 
CancelCheckpointMarker.class) {
    +                                   
processCancellationBarrier((CancelCheckpointMarker) next.getEvent());
    +                           }
                                else {
                                        if (next.getEvent().getClass() == 
EndOfPartitionEvent.class) {
    -                                           numClosedChannels++;
    -                                           // no chance to complete this 
checkpoint
    -                                           releaseBlocks();
    +                                           
processEndOfPartition(next.getChannelIndex());
                                        }
                                        return next;
                                }
                        }
                        else if (!endOfStream) {
                                // end of input stream. stream continues with 
the buffered data
                                endOfStream = true;
    -                           releaseBlocks();
    +                           releaseBlocksAndResetBarriers();
                                return getNextNonBlocked();
    --- End diff --
    
    Sure. The recursion should also have a non-measurable impact, I assume.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to