AHeise commented on code in PR #25292:
URL: https://github.com/apache/flink/pull/25292#discussion_r1758998259
##########
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:
Just in case you haven't seen it: `fullyReceived` is now implicitly 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]