Conversation
Hot fetch: the batched read's options are built once, at open; the key list is cut from one buffer; each pinned value is read once; and the values are copied into one arena per batch instead of one allocation each. A fetch now makes two heap allocations per event id, both inside grocksdb, which TestHotStore_FetchEventsAllocationBudget pins. Cold fetch: payload copies go into one arena per call instead of one allocation each, and cold events reads now fan out over the packfiles with a concurrency of 8. packfile's ReadItems then calls back from several goroutines, so the arena is locked around each copy: unlocked, concurrent copies into its one buffer crashed or silently dropped payloads in testing. The lock covers only the copy, so reads, decodes and unmarshals still overlap. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QHnF5BhsuoxpWxGmatQzmt
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.
What
defaultColdEventReadConcurrency).Why
TestHotStore_FetchEventsAllocationBudgetpins.ReadItemscalls back from several goroutines. Unlocked, concurrent copies into the arena's one buffer crashed or silently dropped payloads in testing. The lock covers only the copy, and the fan-out test forces an 8-way read and compares whole payloads.Split out of #968.
Known limitations
🤖 Generated with Claude Code