fix(prune): respect rocksdb storage settings for history pruning#21535
fix(prune): respect rocksdb storage settings for history pruning#21535HuberyJulianay wants to merge 2 commits intoparadigmxyz:mainfrom
Conversation
ec92a74 to
8dc81e4
Compare
|
Closing this PR after review. The approach has several issues:
If you'd like to pursue this fix, consider:
|
…ackend selection Add tests to ensure that when rocksdb feature is enabled but storage settings specify MDBX (account_history_in_rocksdb=false, storages_history_in_rocksdb=false), the pruner correctly uses the MDBX path and does not touch RocksDB data. This addresses the integration testing suggestion from paradigmxyz#21535 review: - Tests both account_history and storage_history pruning - Verifies MDBX data is pruned - Verifies RocksDB data is NOT modified when settings indicate MDBX backend Also fixes typos CI by adding 'consts' and 'Consts' to the allowed words list (std::env::consts is Rust stdlib, RethCliVersionConsts is a valid type name). Amp-Thread-ID: https://ampcode.com/threads/T-019c1e9b-7b96-702c-8268-a603e741f97b Co-authored-by: Amp <amp@ampcode.com>
…ackend selection Add tests to ensure that when rocksdb feature is enabled but storage settings specify MDBX (account_history_in_rocksdb=false, storages_history_in_rocksdb=false), the pruner correctly uses the MDBX path and does not touch RocksDB data. This addresses the integration testing suggestion from paradigmxyz#21535 review: - Tests both account_history and storage_history pruning - Verifies MDBX data is pruned - Verifies RocksDB data is NOT modified when settings indicate MDBX backend Amp-Thread-ID: https://ampcode.com/threads/T-019c1e9b-7b96-702c-8268-a603e741f97b Co-authored-by: Amp <amp@ampcode.com>
History pruning was hardcoded to use MDBX cursors, ignoring
account_history_in_rocksdbandstorages_history_in_rocksdbsettings. This meant RocksDB history data would never get cleaned up when pruning was enabled.Added
prune_account_history_up_toandprune_storage_history_up_toto RocksDBBatch, and updated the prune segments to check storage settings before choosing the backend.