Fix Iceberg REST catalog commit safety, corruption under post-commit network failure#1676
Closed
il9ue wants to merge 1 commit into
Closed
Fix Iceberg REST catalog commit safety, corruption under post-commit network failure#1676il9ue wants to merge 1 commit into
il9ue wants to merge 1 commit into
Conversation
Original ticket #1609 (storage leak cleanup on TRUNCATE commit failure) investigation revealed a latent table-corruption bug in the REST catalog client that the #1609 fix would propagate into TRUNCATE if written as originally scoped. Repurposing this branch to fix the root cause, with #1609 becoming the final layer on top. See design-notes.md for full investigation and layered fix proposal. Awaiting lead approval on scope expansion before implementation.
Author
|
Will close this issue after pushing PR to antalya 26.3, to be superseded, when the patchset is ready. |
Author
|
Handled in #1982 |
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.
Found while working on #1609 (TRUNCATE storage-leak cleanup)
RestCatalog::updateMetadatareturns a boolean result, which folds two outcomes that need different handling into one value:Both come back as false return, so the caller runs cleanup in either case and deletes the manifest/data files in which live snapshot still references. That's the same cleanup-on-failure pattern I'd otherwise be carrying into TRUNCATE.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix possible data loss in Iceberg writes via REST catalog when a commit response is lost
Documentation entry for user-facing changes
When the network drops the response to a catalog commit that actually succeeded, ClickHouse retries the commit, sees the retry fail, and runs cleanup that deletes object-storage files the catalog at that time points at, leads to possible table corruption. The fix runs cleanup only when the commit was cleanly rejected, while ambiguous outcomes leave the files in place.
CI/CD Options
Exclude tests:
Regression jobs to run: