-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
A-dbRelated to the databaseRelated to the databaseC-enhancementNew feature or requestNew feature or requestS-staleThis issue/PR is stale and will close with no further activityThis issue/PR is stale and will close with no further activity
Description
Describe the feature
Currently, RocksDBProvider::prune_storages_history_above iterates all rows to find entries to delete, which is not scalable for large tables.
The proper approach would be to use StorageChangeSets to determine which keys need to be pruned, similar to how the pruner in crates/prune/prune/src/segments/user/storage_history.rs works, and how TransactionHashNumbers pruning fetches transactions by range.
StorageChangeSets are currently stored in MDBX, not static files. When the checkpoint is behind, the changesets are also behind, so we can't use them to determine which keys to prune. Once StorageChangeSets are moved to static files, refactor to use the changeset-based approach.
Additional context
No response
Closes RETH-161
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-dbRelated to the databaseRelated to the databaseC-enhancementNew feature or requestNew feature or requestS-staleThis issue/PR is stale and will close with no further activityThis issue/PR is stale and will close with no further activity
Type
Projects
Status
Done