Files
rustfs/crates/scanner
houseme cf9f37317e refactor(scanner): split remote_scanner.rs into stream child module
Split the 3080-line remote_scanner.rs (47% inline tests) into a
canonical foo.rs + foo/ module tree with zero behavior change:

- remote_scanner.rs (~320): protocol constants, process statics, and
  the request decode/validate/admit/preflight/claim API plus root
  re-exports
- remote_scanner/stream.rs (~1340): wire/frame types, replay cache,
  FrameAuthenticator, serve path, local bucket scan + persist, client
  scan, and the bounded stream plumbing
- remote_scanner/stream/tests.rs (~1470): the inline test module as a
  child module of stream so it can reach both parents' private items

All crate paths are unchanged: lib.rs re-exports
(serve_remote_scanner_request, RemoteScannerRequest, ...) resolve
through root re-exports, and scanner_io's crate::remote_scanner::
{scan_remote_bucket, RemoteScannerScanSpec, RemoteScannerOutcome}
paths resolve through pub(crate) re-exports. Cross-module items gain
pub(super), whose scope equals the old single-module privacy domain;
no item's effective visibility widens. Code is moved verbatim apart
from those markers, per-module import headers, and rustfmt line
re-wraps.

Co-Authored-By: heihutu <heihutu@gmail.com>
2026-08-20 11:17:59 +08:00
..

RustFS Scanner

RustFS Scanner is the background maintenance scan loop. It handles usage accounting, lifecycle expiry and transition admission, bucket replication repair admission, scanner-driven heal/bitrot checks, and namespace alerts.

For operator-facing runtime controls, status fields, and tuning workflows, see Scanner Runtime Controls. For repeatable scanner-pressure validation, see Scanner Benchmark Runbook.

Chinese documentation is available in README.zh-CN.md.

Development

Build

cargo build --package rustfs-scanner

Test

cargo test --package rustfs-scanner

License

Apache License 2.0