feat: catch-up for read-only ProviderFactorys#23357
Merged
Conversation
Contributor
|
joshieDo
reviewed
Apr 6, 2026
| /// This uses `MDBX_DBG_LEGACY_MULTIOPEN` which recovers POSIX file locks on close. | ||
| /// It may cause unexpected pauses and does not perfectly mirror multi-process behavior. | ||
| /// Use only in tests. | ||
| pub fn enable_legacy_multiopen() { |
Collaborator
There was a problem hiding this comment.
we might be able to use this in tempo test suite as well cc @SuperFluffy
joshieDo
reviewed
Apr 6, 2026
Comment on lines
+97
to
+100
| /// State for on-demand syncing of `RocksDB` secondary and static file indexes. | ||
| /// | ||
| /// Only set for read-only factories. | ||
| read_only_sync: Option<Arc<ReadOnlySyncState>>, |
Collaborator
There was a problem hiding this comment.
should we be more specific that this should be used for out of process concurrent access?
joshieDo
reviewed
Apr 6, 2026
| /// | ||
| /// If `watch` is true, also watches the static files directory for `.conf` changes to | ||
| /// eagerly catch up in the background. | ||
| pub fn with_read_only_sync(mut self, watch: bool) -> Self |
Collaborator
There was a problem hiding this comment.
should we be more specific that this should be used for out of process concurrent access?
joshieDo
approved these changes
Apr 6, 2026
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.
Implements catch-up logic for read-only
ProviderFactory.It is implemented like the following:
reth/crates/storage/provider/src/providers/database/mod.rs
Lines 269 to 297 in 6ea9ce8
This function is invoked in 2 cases:
DatabaseProvideror before every read directly from static files (those bypass mdbx entirely)