Flink: Hold back equality delete converter watermark until completion#17038
Merged
huaxingao merged 1 commit intoJul 3, 2026
Merged
Conversation
This PR fixes the CI test flakiness seen in:
```
TestConvertEqualityDeletesE2E > testConvertEqualityDeletesE2E(String) > [1] staging FAILED
org.opentest4j.AssertionFailedError:
expected: 2L
but was: 1L
at app//org.apache.iceberg.flink.maintenance.api.TestConvertEqualityDeletesE2E.lambda$testConvertEqualityDeletesE2E$1(TestConvertEqualityDeletesE2E.java:127)
```
e.g.:
https://github.com/apache/iceberg/actions/runs/28499724055/job/84473933155?pr=16293
Flink's table maintenance framework maintains a lock to prevent concurrent
execution of maintenance tasks. The component responsible for removing the
lock (LockRemover) releases the task lock once a watermark reaches it past the
task's start timestamp.
EqualityConvertPlanner emits phase watermarks in the middle of its execution,
and the committer forwarded them, so the lock was released before the run
completed. The maintenance framework then started a next cycle concurrently, and
both re-processed the same uncommitted staging snapshot. The overlapping commits
conflicted, and one advanced its commit marker while dropping its deletion
vector, causing the test flakiness.
The solution is to forward watermarks from the committer only after it finishes
the conversion cycle, to ensure mutual exclusive execution of the maintenance
tasks.
wombatu-kun
approved these changes
Jul 2, 2026
Contributor
|
Thanks @mxm for the PR! Thanks @wombatu-kun for the review! |
Contributor
Author
|
Thanks for reviewing @wombatu-kun @huaxingao! Thanks for merging @huaxingao! Here is the backport: #17067 |
nastra
pushed a commit
that referenced
this pull request
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the CI test flakiness seen in:
e.g.: https://github.com/apache/iceberg/actions/runs/28499724055/job/84473933155?pr=16293
Flink's table maintenance framework maintains a lock to prevent concurrent execution of maintenance tasks. The component responsible for removing the lock (LockRemover) releases the task lock once a watermark reaches it past the task's start timestamp.
EqualityConvertPlanner emits phase watermarks in the middle of its execution, and the committer forwarded them, so the lock was released before the run completed. The maintenance framework then started a next cycle concurrently, and both re-processed the same uncommitted staging snapshot. The overlapping commits conflicted, and one advanced its commit marker while dropping its deletion vector, causing the test flakiness.
The solution is to forward watermarks from the committer only after it finishes the conversion cycle, to ensure mutual exclusive execution of the maintenance tasks.