Repository navigation
fix(du): preserve completed snapshots and label initial progress - #433
Merged
Merged
Conversation
Only consume explicitly authorized first-scan values and retain bucket certification timestamps in server snapshot reports.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Snapshot handling can report successful zero usage for malformed or unmeasured buckets, hiding unavailable measurements and producing incorrect totals.
3 open issues
What changed in this PR
Updates du server-snapshot reporting to preserve completed bucket measurements while exposing valid first-scan progress as explicitly partial statistics, alongside the console companion changes.
Changes:
- Requests the snapshot view and validates initial progress without replacing completed measurements.
- Adds per-bucket timestamps and unavailable-bucket metadata, with bucket-scoped output and partial-state labels.
- Extends optional V3 output metadata and adds adapter and command regression tests.
| File | Description |
|---|---|
schemas/output_v3.json |
Adds optional bucket timestamps, initial-progress metadata, and unmeasured bucket names. |
crates/s3/src/ops.rs |
Requests and interprets snapshot data, validates progress, and adds adapter tests. |
crates/core/src/ops.rs |
Extends usage reports with per-bucket measurement metadata. |
crates/cli/src/commands/du.rs |
Scopes metadata, labels partial statistics, and adds command regression tests. |
Review effort: Balanced
Install only missing build tools from signed distribution repositories so an unrelated Git PPA outage cannot block CI. Update url to the patched release and preserve pending snapshot state for unmeasured initial scans.
Keep incomplete measurement rows unavailable, index bucket names for linear merging, and synchronize the native lockfile with the URL security update. Accept expected transport disconnects after fault injection without weakening duplicate-request assertions.
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.


Related Issues
User-reported missing bucket snapshots during the first scanner sweep on RustFS release/1.0.7 at 3dbcae5128fadb9e9ab10101dcebe83d162cb10e. Console companion: rustfs/console#317. Backend companion: rustfs/rustfs#9592.
Background
A completed server snapshot must remain stable while later scanning is in progress. A bucket with no completed measurement may expose progress only when the server explicitly authorizes it as an initial scan. Missing or malformed history must not silently become an empty bucket.
Changes
Validation
Passed locally on the submitted changes:
cargo fmt --all --check cargo check --workspace -j1 CARGO_BUILD_JOBS=1 cargo clippy --workspace -- -D warnings cargo test --workspace -j1Adapter and command regression tests cover explicit initial progress, malformed or untrusted progress, completed-value precedence, and bucket scope. The three initial review threads are addressed. Completed rows require both measurement fields; progress and unavailable names use set indexes, including a 10,000-bucket regression. Backend companion validation is continuing. No live VM or production testing was performed.
CI fixes and status
Updated url to 2.5.9 in the main and native-client lockfiles to address RUSTSEC-2026-0592. Host setup installs only missing packages through temporary signed official Ubuntu/Debian sources, so an unrelated Git PPA HTTP 503 does not block formatting or build tools. Eight setup-action tests are wired into the existing contract job. The HTTP/2 fault fixture accepts expected disconnects after injecting a fault while preserving the assertion that a destructive request is never retried; its regression passed ten consecutive local runs.
Local workspace Clippy with all targets, workspace tests, formatting, dependency advisories, and locked native metadata checks pass on 108dd4a. New GitHub checks are running after the lockfile and review fixes; earlier successes or failures are not presented as results for the new head. No live VM or native SDK runtime validation was performed locally.