[Pruner] trouble shoot compact#3734
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Docker images for this PR are available:
Pull commands:
|
There was a problem hiding this comment.
Pull Request Overview
This PR focuses on troubleshooting and optimizing compaction in the Rooch blockchain's pruning system to better reclaim disk space after deleting obsolete state data. The changes address issues where deleted data remained on disk despite pruning operations.
Key changes include:
- Enabling BlobDB garbage collection in RocksDB configuration
- Implementing more aggressive compaction strategies with proper bottommost level compaction
- Adding comprehensive database analysis and diagnostic tools
- Optimizing the sweep implementation with better batch processing and bloom filter tracking
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| moveos/raw-store/src/rocks/mod.rs | Enables BlobDB garbage collection for space reclamation |
| moveos/moveos-store/src/state_store/mod.rs | Improves compaction with forced bottommost level compaction and RAII guards |
| moveos/moveos-store/src/prune/mod.rs | Adds deleted state root bloom filter tracking infrastructure |
| moveos/moveos-store/src/lib.rs | Integrates new deleted roots bloom column family |
| moveos/moveos-store/src/tests/test_prune_store.rs | Tests for deleted state root bloom filter persistence |
| docs/dev-guide/rocksdb_stats_usage.md | Documentation for new RocksDB diagnostic tools |
| crates/rooch/src/commands/db/ | New CLI commands for database analysis and benchmarking |
| crates/rooch-pruner/src/sweep_expired.rs | Major optimization of sweep logic with better ordering and compaction |
| crates/rooch-pruner/src/pruner.rs | Integration of optimized sweep with tx_order tracking |
| @@ -0,0 +1,196 @@ | |||
| # RocksDB 统计工具使用指南 | |||
There was a problem hiding this comment.
[nitpick] The documentation is written in Chinese which may limit accessibility for international contributors. Consider providing an English version or translating to English for broader accessibility.
| let mut stack = VecDeque::new(); | ||
| stack.push_back(root_hash); | ||
| let mut batch = Vec::with_capacity(1000); // Process deletion in small batches | ||
| let mut batch = Vec::with_capacity(10000); // Larger batch for better performance |
There was a problem hiding this comment.
The batch size is hardcoded. Consider making this configurable through the pruner configuration to allow tuning based on system resources and performance requirements.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
Summary about this PR