Skip to content

[FLINK-38370] Ensure CommitterOperator commits all pending committables in batch mode#27004

Merged
mxm merged 1 commit into
apache:masterfrom
mxm:FLINK-38370
Sep 18, 2025
Merged

[FLINK-38370] Ensure CommitterOperator commits all pending committables in batch mode#27004
mxm merged 1 commit into
apache:masterfrom
mxm:FLINK-38370

Conversation

@mxm

@mxm mxm commented Sep 18, 2025

Copy link
Copy Markdown
Contributor

In #26433, we removed the EOI marker in the form of Long.MAX_VALUE as the checkpoint id. Since streaming pipelines can continue to checkpoint even after their respective operators have been shut down, it is not safe to use a constant as this can lead to duplicate commits.

However, in batch pipelines we only have one commit on job shutdown. Using any checkpoint id should suffice in this scenario. Any pending committables should be processed by the ComitterOperator when the operator shuts down. No further checkpoints will take place.

There are various connectors which rely on this behavior. I don't see any drawbacks from keeping this behavior for batch pipelines.

…es in batch mode

In apache#26433, we removed the EOI marker in the form of Long.MAX_VALUE as the checkpoint id. Since
streaming pipelines can continue to checkpoint even after their respective operators have been shut
down, it is not safe to use a constant as this can lead to duplicate commits.

However, in batch pipelines we only have one commit on job shutdown. Using any checkpoint id should
suffice in this scenario. Any pending committables should be processed by the ComitterOperator when
the operator shuts down. No further checkpoints will take place.

There are various connectors which rely on this behavior. I don't see any drawbacks from keeping
this behavior for batch pipelines.
@mxm mxm requested a review from AHeise September 18, 2025 11:41
@flinkbot

flinkbot commented Sep 18, 2025

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@AHeise AHeise left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@stevenzwu stevenzwu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. thanks for also adding the unit test coverage

@mxm

mxm commented Sep 18, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the quick reviews @AHeise and @stevenzwu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants