[wip] another btree#19742
Open
AskAlexSharov wants to merge 13 commits into
Open
Conversation
anacrolix
added a commit
that referenced
this pull request
Mar 18, 2026
anacrolix
added a commit
that referenced
this pull request
Mar 27, 2026
anacrolix
added a commit
that referenced
this pull request
Mar 31, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Switches the in-memory ordered map used for StorageDomain buffering from tidwall/btree to anacrolix/btree, aligning with the performance/memory investigation in #17988 and keeping prefix-iteration support intact in the state aggregator pipeline.
Changes:
- Promote
github.com/anacrolix/btree v0.1.1to a direct dependency ingo.mod. - Replace
tidwall/btreemap usage inTemporalMemBatchwithanacrolix/btree(MakeMap,Upsert,Iterator,Reset). - Adapt the storage-domain prefix-iteration path (
debugIteratePrefixLatest) to consume an*anacrolix/btree.Mapand its iterator API.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| go.mod | Makes github.com/anacrolix/btree a direct requirement (was indirect). |
| db/state/temporal_mem_batch.go | Migrates the StorageDomain in-RAM structure to anacrolix/btree and updates write/clear/merge logic accordingly. |
| db/state/domain_stream.go | Updates the RAM portion of the multi-source prefix iterator to use anacrolix/btree iterators. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yperbasis
previously requested changes
Apr 24, 2026
yperbasis
left a comment
Member
There was a problem hiding this comment.
Submodule execution-spec-tests should not change
Contributor
|
I'll bow out of pushing this one for now. |
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.
for: #17988
see also:
anacrolix/btree#1
anacrolix/btree#3