Repository navigation
compute: spill correction chunks at their merge depth - #39460
Merged
Merged
Conversation
The correction buffer spilled every chunk at depth 0, so the buffer pool kept all of them in its hottest eviction band and never compressed them. Chunks now carry a generational depth like the merge batcher's: a bucket's chain merge writes its output one generation deeper than its deepest input, and the pool evicts deeper chunks first and compresses them past `column_chunk_compress_min_depth`. Chunks built from staged updates and chunks a read writes into `emitted` stay at depth 0, because the next write and the feedback retractions read them right away. Splits keep the depth of the chunk they copy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
antiguru
force-pushed
the
moritz/correction-chunk-depth
branch
from
October 1, 2026 17:07
8ae3dae to
90af05a
Compare
Member
Author
|
Thanks for the reviews! |
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.
The correction buffer spilled every chunk at depth 0, which put all of them in the buffer pool's hottest eviction band and kept them out of compression. The merge batcher instead tags chunks with a generational depth that grows with each merge they survive, and the pool evicts deeper chunks first and compresses them past
column_chunk_compress_min_depth. This change gives correction chunks the same depth.A bucket's chain merge writes its output one generation deeper than its deepest input. The bucket's geometric chain invariant is the same structure the merge batcher's depth describes: a merged chain waits about
chain_proportionalitytimes longer for its next merge. Chunks that a read writes intoemittedstay at depth 0, because the caller iterates them next and the next consolidation merges them with the feedback retractions. Chunks built from staged updates also start at depth 0, and a split keeps the depth of the chunk it copies.On a CPU-bound M.1-nano, compressing every spilled correction chunk was about 12% slower than not compressing (CPU-279). With the default floor of 1, this change compresses the chain-merge generations of a hydration snapshot, so it trades CPU for memory on such replicas. The floor stays tunable per replica.
On top of #39159. Part of CPU-279.
🤖 Generated with Claude Code