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



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/AlternatingController.java
##########
@@ -114,6 +114,7 @@ public void barrierAnnouncement(
                        lastSeenBarrier = barrier.getId();
                        firstBarrierArrivalTime = getArrivalTime(barrier);
                }
+               activeController = chooseController(barrier);

Review comment:
       Consider a checkpoint with two barriers from two channels: UC and AC:
   1. Process AC announcement. Set 
`SingleCheckpointBarrierHandler.currentCheckpointId`. Don't timeout. 
   2. Process UC barrier (no announcements). Because `currentCheckpointId` was 
set `checkSubsumedCheckpoint` does nothing, i.e. 
`preProcessFirstBarrierOrAnnouncement` not called and controller so 
`activeController` == AC
   3. Further process (UC) barrier - now AC controller is processing UC barrier
   
   > (as in other places: a unit test would be helpful)
   
   I agree, will add it.




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