fix(transaction): fix previous snapshot summary fetching#2391
Merged
CTTY merged 4 commits intoapache:mainfrom May 9, 2026
Merged
fix(transaction): fix previous snapshot summary fetching#2391CTTY merged 4 commits intoapache:mainfrom
CTTY merged 4 commits intoapache:mainfrom
Conversation
Contributor
Author
|
+1 fix, `total-records` of the new snapshot was set to `added-records`
(=2 for a 2-row delta) instead of `parent.total + added` (=484065).
With the patch applied locally, the snapshot summary correctly
reports the cumulative and downstream consumers reading metadata.json
directly (iceberg-java in our case) see the right value on the next
commit. 36/36 snapshot tests stay green.
Edge case for the docs / future follow-up: tables with history
already corrupted by the buggy version will keep propagating wrong
totals because parent.total-records is read as-is. In practice
re-bootstrapping unblocks; a chain-walk recompute could self-heal
if needed, but it's not warranted for this PR. Thanks for the fix!``` |
Contributor
Author
|
Hi @Xuanwo I'm wondering if you could take a look when you have some time? Thank you! |
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.

Which issue does this PR close?
What changes are included in this PR?
The root cause for the issue is, we use the current snapshot id (which hasn't been reflected to table metadata yet) to get previous snapshot summary.
Are these changes tested?
Yes.