rkhachatryan commented on a change in pull request #14057: URL: https://github.com/apache/flink/pull/14057#discussion_r540444475
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/AlternatingController.java ########## @@ -146,28 +146,7 @@ private void switchToUnaligned( @Override public Optional<CheckpointBarrier> postProcessLastBarrier(InputChannelInfo channelInfo, CheckpointBarrier barrier) throws IOException, CheckpointException { - Optional<CheckpointBarrier> maybeTimeOut = asTimedOut(barrier); - if (maybeTimeOut.isPresent() && activeController == alignedController) { - switchToUnaligned(channelInfo, maybeTimeOut.get()); - checkState(activeController == unalignedController); - checkState(!activeController.postProcessLastBarrier(channelInfo, maybeTimeOut.orElse(barrier)).isPresent()); - return maybeTimeOut; - } - - barrier = maybeTimeOut.orElse(barrier); - if (barrier.getCheckpointOptions().isUnalignedCheckpoint()) { - checkState(activeController == unalignedController); - checkState(!activeController.postProcessLastBarrier(channelInfo, maybeTimeOut.orElse(barrier)).isPresent()); - return Optional.empty(); - } - else { - checkState(activeController == alignedController); - Optional<CheckpointBarrier> triggerResult = activeController.postProcessLastBarrier( - channelInfo, - barrier); - checkState(triggerResult.isPresent()); - return triggerResult; - } Review comment: Yes, with `switchToUnaligned` in `barrierReceived` it seems unnecessary. With this code, `UnalignedCheckpointITCase` fails: some tests on `checkState` (line 164 above), some hanging up. Besides, why timeout alignment if it's the last barrier? This essentially means that alignment is done. ---------------------------------------------------------------- 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