Skip to content

Fix initial load completion tracking race condition#6711

Open
lawofcycles wants to merge 1 commit intoopensearch-project:mainfrom
lawofcycles:fix/iceberg-initial-load-completion-race
Open

Fix initial load completion tracking race condition#6711
lawofcycles wants to merge 1 commit intoopensearch-project:mainfrom
lawofcycles:fix/iceberg-initial-load-completion-race

Conversation

@lawofcycles
Copy link
Copy Markdown
Contributor

Description

Move the completion tracking GlobalState creation to before the task partition loop in performInitialLoad(). Previously it was created after all partitions, so workers that finished before the key existed would silently lose their completion increments, preventing the initial load from completing.

Issues Resolved

Resolves #6686

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

creation loop in performInitialLoad(). Previously, the completion key
was created after all partitions, allowing workers to finish and call
incrementSnapshotCompletionCount() before the key existed. Those
increments were silently lost, causing waitForSnapshotComplete() to
never reach the expected total.

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
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.

[BUG] Iceberg source initial load completion detection fails due to race condition between Leader and Worker

1 participant