Iceberg Performance/correctness improvements#34961
Merged
DAlperin merged 8 commits intoMaterializeInc:mainfrom Feb 13, 2026
Merged
Iceberg Performance/correctness improvements#34961DAlperin merged 8 commits intoMaterializeInc:mainfrom
DAlperin merged 8 commits intoMaterializeInc:mainfrom
Conversation
Snapshot batches can contain millions of rows, causing the DeltaWriter's seen_rows HashMap to grow unbounded and consume excessive memory. For snapshots, disable position delete tracking by setting max_seen_rows=0. All deletes will use equality deletes instead, eliminating the memory overhead at the cost of slightly slower reads (acceptable for snapshots). Normal post-snapshot batches continue using position deletes as usual. Requires iceberg-rust 1b01c099 which adds the disable feature.
For fresh sinks, the catch-up batch was incorrectly starting from Timestamp::minimum() instead of as_of, causing it to cover a range where no data exists. Use max(resume_upper, as_of) as the batch lower bound to handle both: - Fresh sinks: start from as_of (where data actually begins) - Resuming sinks: start from resume_upper (where we left off)
Add debug! and trace! logging at key points to help diagnose issues: - Batch description minting (catch-up and future batches) - Waiting for first batch description before processing data - Batch descriptions received by write operator - Stashed rows (trace level) and periodic stash size warnings - Batch closing with frontier positions - Files written per batch This will help debug snapshot processing issues and frontier advancement.
Track max observed timestamps before init to synthesize an upper when a bounded input closes, and exit cleanly once the frontier is empty after init. Start minting once the frontier reaches as_of/resume_upper instead of waiting past them. Close write batches when the input frontier reaches the batch upper and only rescan when batch/frontier advances.
7cb18b8 to
16f2729
Compare
After restarts or restores we might see rows that we have already written. We should robustly drop those at the soonest moment we know we will not look at them.
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 is a stack of changes designed to address some of the bugs and perf issues discovered in testing.
I recommend reviewing each commit separately. If github had stacked PRs I'd use it here, but I'm not opening a PR for each of these commits :)
Motivation
Tips for reviewer
Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.