-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
A-dbRelated to the databaseRelated to the databaseC-enhancementNew feature or requestNew feature or request
Description
As noted in PR #20478 review, the current StaticFileProvider::check_consistency method performs two types of consistency checks that need to be separated for correct ordering with RocksDB checks.
Current Behavior
check_consistency does 2 types of checks:
- File consistency - When a static file fails to commit but the underlying data was changed (internal to static files)
- Storage consistency - Comparing static files vs MDBX checkpoints
Problem
RocksDB consistency checks need static file data to prune transaction hashes. The correct order should be:
static_file_provider.check_file_consistency()- internal static file checks (run first)rocksdb_provider.check_consistency()- vs MDBX checkpoints, uses SF data for tx hashesstatic_file_provider.check_storage_consistency()- vs MDBX checkpoints (run last)
Required Changes
Refactor StaticFileProvider::check_consistency into two separate methods:
check_file_consistency()- handles internal file integritycheck_storage_consistency()- handles comparison with MDBX checkpoints
Blocked
- PR feat(storage): add RocksDB consistency check on startup #20478 (RocksDB consistency check) depends on this refactoring for correct ordering
Metadata
Metadata
Assignees
Labels
A-dbRelated to the databaseRelated to the databaseC-enhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog