Skip to content

fix(du): show full-traversal estimates for hot buckets - #443

Merged
cxymds merged 1 commit into
mainfrom
cxymds/du-hot-bucket-observations
Dec 3, 2026
Merged

cxymds merged 1 commit into
mainfrom
cxymds/du-hot-bucket-observations

Conversation

@cxymds

@cxymds cxymds commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Handle observed_buckets in the persisted RustFS usage view for a bucket that changes throughout its scanner traversal. Prefer a completed bucket statistic when available, then a timestamped traversal estimate, then eligible first-scan progress. The estimate provides logical bytes and current object count.

Bucket output labels such estimates with their original timestamp, and JSON v3 identifies them in the optional data.observed_statistics map. Cluster totals exclude these rows. The command keeps its existing partial-result exit code 3.

Verification

  • A regression fixture failed on main with 1 object and 7 bytes from first-scan progress even though a completed observation reported 5 objects and 72 bytes. The same test now selects 5 and 72, and the cluster total remains 2 certified objects and 19 bytes.
  • cargo test --workspace passed 2,092 tests. cargo fmt --all --check and cargo clippy --workspace -- -D warnings passed.
  • Ran the built rc against a loopback HTTP fixture. Bucket and cluster JSON and text output identified the estimate and returned exit 3. The certified bucket returned exit 0, and all requests stayed on the admin routes.
  • Ran the built client against a single-disk RustFS source and a separate RustFS tier under one unchanged lifecycle rule. Two consecutive completed scanner cycles returned 1 object / 5 bytes and then 2 objects / 11 bytes as timestamped estimates (exit 3). The cluster counted only the cold bucket (1 object / 6 bytes). After convergence, the bucket returned 2 objects / 11 bytes with exit 0 and matched the S3 listing.

Refs rustfs/rustfs#9855. The matching server change is rustfs/rustfs#9882.

@cxymds
cxymds merged commit 17a8995 into main Dec 3, 2026
14 checks passed
@cxymds
cxymds deleted the cxymds/du-hot-bucket-observations branch December 3, 2026 06:31
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.

1 participant