feat(storage): add method to check invariants on RocksDB tables#20340
Merged
feat(storage): add method to check invariants on RocksDB tables#20340
Conversation
CodSpeed Performance ReportMerging #20340 will not alter performanceComparing Summary
Footnotes
|
joshieDo
reviewed
Dec 12, 2025
joshieDo
reviewed
Dec 12, 2025
da863a7 to
0c2d74a
Compare
joshieDo
reviewed
Dec 15, 2025
joshieDo
reviewed
Dec 15, 2025
joshieDo
reviewed
Dec 15, 2025
0c2d74a to
2b71528
Compare
joshieDo
reviewed
Dec 16, 2025
joshieDo
reviewed
Dec 16, 2025
joshieDo
reviewed
Dec 16, 2025
joshieDo
reviewed
Dec 17, 2025
joshieDo
reviewed
Dec 17, 2025
joshieDo
reviewed
Dec 17, 2025
…excess data instead of requiring unwind
…s instead of iterating all rows
381cbae to
ac1cd59
Compare
joshieDo
approved these changes
Dec 17, 2025
yongkangc
pushed a commit
that referenced
this pull request
Dec 18, 2025
This was referenced Jan 22, 2026
yongkangc
added a commit
that referenced
this pull request
Jan 22, 2026
…ility - Fix clippy doc_markdown warning: add backticks around 'static_file' - Fix TODO link: use issue #18983 instead of PR #20340 - Add observability logs for empty RocksDB history tables with non-zero checkpoint - Add debug_assert + warning when duplicate history indices are detected Amp-Thread-ID: https://ampcode.com/threads/T-019be55f-a227-7054-ac77-61654cb7c823
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.
Closes #20153
Adds invariant checking for RocksDB tables, similar to the existing
check_consistencyandensure_invariantsmethods for static files.first()andlast()methods toRocksDBProviderfor efficient table bounds checkingcheck_consistency()method that validates RocksDB tables against MDBX stage checkpointsTransactionHashNumbers: maps max tx_number -> block_number viaTransactionBlocksto detect if RocksDB is behind theTransactionLookupcheckpointStoragesHistory: checks if table is empty whenIndexStorageHistorycheckpoint indicates data should exist