dawidwys commented on a change in pull request #15313:
URL: https://github.com/apache/flink/pull/15313#discussion_r599672126



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/checkpointing/SingleCheckpointBarrierHandler.java
##########
@@ -126,69 +202,38 @@ public void processBarrier(CheckpointBarrier barrier, 
InputChannelInfo channelIn
 
         if (currentCheckpointId > barrierId
                 || (currentCheckpointId == barrierId && 
!isCheckpointPending())) {
-            controller.obsoleteBarrierReceived(channelInfo, barrier);
             return;
         }
 
-        checkSubsumedCheckpoint(barrier);
+        checkNewCheckpoint(barrier);
 
-        if (numBarriersReceived == 0) {
+        if (numBarriersReceived++ == 0) {
             if (getNumOpenChannels() == 1) {
                 markAlignmentStartAndEnd(barrier.getTimestamp());
             } else {
                 markAlignmentStart(barrier.getTimestamp());
             }
             allBarriersReceivedFuture = new CompletableFuture<>();
-
-            if (!handleBarrier(barrier, channelInfo, 
controller::preProcessFirstBarrier)) {
-                return;
-            }
-        }
-
-        if (!handleBarrier(barrier, channelInfo, controller::barrierReceived)) 
{
-            return;
         }
 
-        if (currentCheckpointId == barrierId) {

Review comment:
       Yes, it is a no-op, because:
   
   1. After condition in line 116-117 `currentCheckpointId` is 
`currentCheckpointId <= barrierId`
   2. If `currentCheckpointId < barrier` then in line 122 in 
`checkSubsumedCheckpoint` it will be reassigned to `currentCheckpointId = 
barrierId`
   
   Because of 1 and 2 the condition `currentCheckpointId == barrierId` is 
always true.




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