Repository navigation
Layout F: a commit's writer holds a run at most - #63
Merged
Merged
Conversation
A commit's index entries were held until it finished, about 0.33 KB a record: a 204k-record push ran the bulk Worker out of memory on staging. The writer now writes a self-contained run (closed packs, an index layer) whenever drain finds writerRunEntries held, named as it goes or, held, returned for the commit to name. copyRecords drains the same way. memory.ts takes --layout.
Closed packs wrote with no limit: with large records a run's worth could be compressing at once.
tefkah
added a commit
that referenced
this pull request
Oct 20, 2026
…d entries count toward a writer's runs
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.
A commit's writer kept every index entry, about 0.33 KB a record, until the commit finished. On staging a 204k-record push (80 MB, the serial path) ran the bulk Worker out of memory on 11 of 14 attempts.
drainfindslayoutConfig.writerRunEntries(20,000) held. Not held, each run is named as it's written; held (commit units), the runs are returned for the commit to name together.drainalso waits on the writer's pack writes, so packs of large records don't pile up compressing.copyRecords(privacy moves) drains the same way, in place of its own 100k batches.scripts/memory.ts --layout f.Serial commit (
memory.ts --above-mb 100000 --pushes 1 --layout f), peak above start:What's left is the sink's writes in flight, which
pendingBytesbounds.Protocol tests 254 and server tests 566 (both layouts) pass. A follow-up PR bounds F's other paths (index reads, merges, reclaim, sync).