AHeise commented on code in PR #25292: URL: https://github.com/apache/flink/pull/25292#discussion_r1756475601
########## flink-runtime/src/main/java/org/apache/flink/streaming/runtime/operators/sink/CommitterOperator.java: ########## @@ -156,23 +156,16 @@ public void endInput() throws Exception { @Override public void notifyCheckpointComplete(long checkpointId) throws Exception { super.notifyCheckpointComplete(checkpointId); - if (endInput) { - // This is the final checkpoint, all committables should be committed - lastCompletedCheckpointId = Long.MAX_VALUE; - } else { - lastCompletedCheckpointId = Math.max(lastCompletedCheckpointId, checkpointId); - } + lastCompletedCheckpointId = Math.max(lastCompletedCheckpointId, checkpointId); commitAndEmitCheckpoints(); } private void commitAndEmitCheckpoints() throws IOException, InterruptedException { + long completedCheckpointId = endInput ? EOI : lastCompletedCheckpointId; do { for (CheckpointCommittableManager<CommT> manager : - committableCollector.getCheckpointCommittablesUpTo(lastCompletedCheckpointId)) { - // wait for all committables of the current manager before submission - boolean fullyReceived = - !endInput && manager.getCheckpointId() == lastCompletedCheckpointId; - commitAndEmit(manager, fullyReceived); + committableCollector.getCheckpointCommittablesUpTo(completedCheckpointId)) { Review Comment: @fapaul please double-check why we did it in this complicated manner originally. -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org