davidradl commented on code in PR #26433:
URL: https://github.com/apache/flink/pull/26433#discussion_r2037023057
##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/operators/sink/CommitterOperator.java:
##########
@@ -151,24 +149,23 @@ public void snapshotState(StateSnapshotContext context)
throws Exception {
@Override
public void endInput() throws Exception {
- endInput = true;
if (!isCheckpointingEnabled || isBatchMode) {
// There will be no final checkpoint, all committables should be
committed here
- commitAndEmitCheckpoints();
+ commitAndEmitCheckpoints(lastCompletedCheckpointId + 1);
}
}
@Override
public void notifyCheckpointComplete(long checkpointId) throws Exception {
super.notifyCheckpointComplete(checkpointId);
- lastCompletedCheckpointId = Math.max(lastCompletedCheckpointId,
checkpointId);
- commitAndEmitCheckpoints();
+ commitAndEmitCheckpoints(Math.max(lastCompletedCheckpointId,
checkpointId));
}
- private void commitAndEmitCheckpoints() throws IOException,
InterruptedException {
- long completedCheckpointId = endInput ? EOI :
lastCompletedCheckpointId;
+ private void commitAndEmitCheckpoints(long checkpointId)
+ throws IOException, InterruptedException {
+ lastCompletedCheckpointId = checkpointId;
Review Comment:
Thanks for the explanation @AHeise - that makes sense
--
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]