-
Notifications
You must be signed in to change notification settings - Fork 386
Make root offsets chunk allocation configurable #1937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR makes the number of chunks allocated for root offsets configurable through a new --root-offsets-chunk-count flag in the monad_mpt CLI tool. Previously hardcoded to 2 chunks, operators can now adjust history depth based on deployment requirements, with each chunk holding approximately 16.5M history entries.
Key changes:
- Added
root_offsets_chunk_countconfiguration field with default value of 2 - Changed
UpdateAuxandUpdateAuxImplconstructors from taking pointer to reference forAsyncIO - Updated storage pool to support configurable conventional chunk counts with backward compatibility
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| category/mpt/ondisk_db_config.hpp | Added root_offsets_chunk_count configuration field |
| category/async/storage_pool.hpp | Added num_cnv_chunks field to creation flags and metadata |
| category/async/storage_pool.cpp | Implemented configurable chunk allocation with backward compatibility |
| category/mpt/trie.hpp | Changed constructors to take AsyncIO by reference instead of pointer |
| category/mpt/update_aux.cpp | Updated set_io signature and chunk allocation logic |
| category/mpt/db.cpp | Updated constructor calls to pass AsyncIO by reference |
| category/mpt/find_notify_fiber.cpp | Changed member variable from pointer to reference |
| category/mpt/cli_tool_impl.cpp | Added --root-offsets-chunk-count CLI flag and validation |
| category/mpt/test/update_aux_test.cpp | Added test for configurable chunk allocation |
| category/mpt/test/*.cpp | Updated test code to use reference-based constructors |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ec0b109 to
cd1df48
Compare
cd1df48 to
0003927
Compare
852d4dd to
269892e
Compare
269892e to
97a2d6a
Compare
Add --root-offsets-chunk-count flag to monad_mpt to make the number of chunks allocated for root offsets configurable (default: 16, must be power of 2). Each chunk holds approximately 16.5M history entries, allowing operators to adjust history depth based on deployment requirements. Previously, this was hardcoded to 2 chunks.
97a2d6a to
0c8e294
Compare
Add
--root-offsets-chunk-countflag tomonad_mptto make the number ofchunks allocated for root offsets configurable (default: 16, must be
power of 2). Each chunk holds approximately 16.5M history entries,
allowing operators to adjust history depth based on deployment
requirements. Previously, this was hardcoded to 2 chunks.