Skip to content

Flink: Fix non-deterministic operator UIDs in DynamicIcebergSink#15687

Merged
pvary merged 1 commit intoapache:mainfrom
mxm:dynamic-sink-pre-commit-uid
Mar 20, 2026
Merged

Flink: Fix non-deterministic operator UIDs in DynamicIcebergSink#15687
pvary merged 1 commit intoapache:mainfrom
mxm:dynamic-sink-pre-commit-uid

Conversation

@mxm
Copy link
Contributor

@mxm mxm commented Mar 19, 2026

The pre-commit topology operator UID included a random UUID (sinkId), which changed on every sink instantiation. This prevented Flink from restoring state from checkpoints/savepoints because operator UIDs didn't match across full redeploys. This did not affect simple failures / restarts because the JobGraph is not re-generated then.

Use a fixed suffix for the UID, consistent with the other operators (generator, updater, sink) which already use deterministic UIDs. The sinkId is still used in the committer for file separation.

I deliberately did not change the UID syntax. Despite the bug, users will still be able to restore state, e.g. via Flink's allowNonRestoredState, but we must keep the stateful operators UUIds like the committer consistent.

The pre-commit topology operator UID included a random UUID (sinkId),
which changed on every sink instantiation. This prevented Flink from
restoring state from checkpoints/savepoints because operator UIDs
didn't match across full redeploys. This did not affect simple failures /
restarts because the JobGraph is not re-generated then.

Use a fixed suffix for the UID, consistent with the other operators
(generator, updater, sink) which already use deterministic UIDs.
The sinkId is still used in the committer for file separation.

I deliberately did not change the UID syntax. Despite the bug, users will still
be able to restore state, e.g. via Flink's `allowNonRestoredState`, but we must
keep the stateful operators UUIds like the committer consistent.
@github-actions github-actions bot added the flink label Mar 19, 2026
@pvary pvary merged commit fce4985 into apache:main Mar 20, 2026
16 checks passed
@pvary
Copy link
Contributor

pvary commented Mar 20, 2026

Merged to main.
Thanks @mxm for the PR and the offline explanation!

@mxm mxm deleted the dynamic-sink-pre-commit-uid branch March 20, 2026 15:48
@mxm
Copy link
Contributor Author

mxm commented Mar 20, 2026

Thanks @pvary!

mxm added a commit to mxm/iceberg that referenced this pull request Mar 20, 2026
mxm added a commit to mxm/iceberg that referenced this pull request Mar 23, 2026
mxm added a commit to mxm/iceberg that referenced this pull request Mar 23, 2026
amogh-jahagirdar pushed a commit that referenced this pull request Mar 24, 2026
… Sink (#15687) (#15738)

* Flink: Backport: Fix non-deterministic operator UIDs in DynamicIcebergSink (#15687)

* fixup! Fix merge conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants