clean pruner code#3832
Merged
Merged
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.OpenSSF Scorecard
Scanned Files
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the live pruner service from Rooch in favor of a stop-the-world garbage collection (GC) approach. The changes represent a significant architectural shift in how state cleanup is performed.
Key Changes
- Removed live pruner service: Deleted
StatePrunerthread-based background pruner and all related infrastructure (atomic snapshots, error recovery, incremental sweep) - Removed diagnostic commands: Deleted CLI commands
prune-diagnosis,reach-check, andlist-stalethat were specific to live pruner debugging - Simplified configuration: Removed live-pruner-specific fields from
PruneConfig(enable, interval_s, boot_cleanup_done, incremental sweep settings) - Retained GC utilities: Kept
calculate_sweep_start_orderfunction as a public utility for GC operations
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/typescript/rooch-pruner-e2e/src/case/pruner-e2e.spec.ts | Deleted entire live pruner E2E test suite |
| sdk/typescript/rooch-pruner-e2e/src/case/gc-e2e.spec.ts | Fixed error message checking to use combined stdout/stderr and added case-insensitive strategy matching |
| crates/rooch/src/commands/db/mod.rs | Removed imports and enum variants for deleted pruner diagnostic commands |
| crates/rooch/src/commands/db/commands/mod.rs | Removed module declarations for deleted commands |
| crates/rooch/src/commands/db/commands/*.rs | Deleted reach_check, prune_diagnosis, and list_stale command implementations |
| crates/rooch-rpc-server/src/lib.rs | Removed StatePruner initialization, imports, and shutdown handling from server |
| crates/rooch-pruner/tests/*.rs | Deleted live pruner test files (atomic snapshot, deletion effectiveness, error recovery, etc.) |
| crates/rooch-pruner/src/pruner.rs | Gutted StatePruner struct, kept only calculate_sweep_start_order utility function |
| crates/rooch-pruner/src/lib.rs | Removed module declarations for deleted components (atomic_snapshot, error_recovery, incremental_sweep, validation_tests) |
| crates/rooch-pruner/src/*.rs | Deleted incremental_sweep, error_recovery, atomic_snapshot, validation_tests modules |
| crates/rooch-config/src/prune_config.rs | Removed live-pruner-specific configuration fields, retained GC-related fields |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Summary about this PR