Skip to content

[Pruner] trouble shoot compact#3734

Merged
jolestar merged 9 commits into
mainfrom
trouble_shoot_compact
Nov 18, 2025
Merged

[Pruner] trouble shoot compact#3734
jolestar merged 9 commits into
mainfrom
trouble_shoot_compact

Conversation

@baichuan3

@baichuan3 baichuan3 commented Oct 3, 2025

Copy link
Copy Markdown
Contributor

Summary

Summary about this PR

  1. Add more db tools to analysis and stats rocksdb db
  2. Optimize sweep implementation to try to trigger compact faster
  3. Some other optimization points
  • Closes #issue

@vercel

vercel Bot commented Oct 3, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rooch-portal-v2.1 Ready Ready Preview Comment Nov 18, 2025 3:56am
test-portal Ready Ready Preview Comment Nov 18, 2025 3:56am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
rooch Ignored Ignored Preview Nov 18, 2025 3:56am

@github-actions

github-actions Bot commented Oct 3, 2025

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Oct 3, 2025

Copy link
Copy Markdown

Docker images for this PR are available:

  • ghcr.io/rooch-network/rooch:pr-3734
  • ghcr.io/rooch-network/rooch:pr-3734-da11710
  • ghcr.io/rooch-network/rooch:pr-3734_debug
  • ghcr.io/rooch-network/rooch:pr-3734-da11710_debug

Pull commands:

  • docker pull ghcr.io/rooch-network/rooch:pr-3734
  • docker pull ghcr.io/rooch-network/rooch:pr-3734-da11710
  • docker pull ghcr.io/rooch-network/rooch:pr-3734_debug
  • docker pull ghcr.io/rooch-network/rooch:pr-3734-da11710_debug

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread moveos/moveos-store/src/state_store/mod.rs Outdated
Comment thread crates/rooch/src/commands/db/commands/rocksdb_stats.rs Outdated
Comment thread crates/rooch-pruner/src/sweep_expired.rs Outdated
@@ -0,0 +1,196 @@
# RocksDB 统计工具使用指南

Copilot AI Oct 7, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Copilot uses AI. Check for mistakes.
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

Copilot AI Oct 7, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The batch size is hardcoded. Consider making this configurable through the pruner configuration to allow tuning based on system resources and performance requirements.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jolestar jolestar merged commit af42d1f into main Nov 18, 2025
16 of 21 checks passed
@jolestar jolestar deleted the trouble_shoot_compact branch November 18, 2025 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants