Skip to content

feat(replication): add typed metrics and MRF inspection - #328

Merged
cxymds merged 1 commit into
mainfrom
cxymds/feat-replication-metrics-truth
Jul 24, 2026
Merged

feat(replication): add typed metrics and MRF inspection#328
cxymds merged 1 commit into
mainfrom
cxymds/feat-replication-metrics-truth

Conversation

@cxymds

@cxymds cxymds commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the untyped replication metrics passthrough with forward-compatible
    typed status and aggregate MRF contracts
  • add rc bucket replication mrf ALIAS/BUCKET and expose the same command
    through the replicate compatibility surface
  • preserve provider availability, cluster completeness and node counts, queue,
    latency and bandwidth scopes, runtime/durable MRF availability, and partial
    target observations
  • represent legacy missing truth metadata as legacy_unknown instead of
    inferring a healthy zero backlog
  • validate failed-counter consistency, negative observations, target totals,
    and response bucket identity without inventing target queues, uptime,
    per-object rows, or unavailable per-target durable records
  • bound both success and error bodies to 8 MiB and retain distinct auth,
    missing configuration/bucket, unsupported, malformed, and oversized errors
  • add deterministic human and output-v3 JSON projections with credential and
    control-character redaction

Compatibility

This is an additive output-v3 extension: the existing replication diff variant
and fixtures remain valid. schemas/output_v1.json and the protected command
reference are unchanged. Older server responses remain readable but are
explicitly classified as legacy_unknown where they lack truth metadata.

During a rolling RustFS upgrade, incomplete node aggregation is rendered as
partial rather than a complete healthy snapshot.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace --quiet
  • output-v3 schema and golden fixture tests for status and MRF
  • help surface verification for status, MRF, and diff commands
  • seven-view review covering requirements, server contract, Rust API,
    HTTP/error bounds, security/redaction, output compatibility, and QA/operations

Dependency

The authoritative service-side truth contract is implemented by
rustfs/rustfs#5209 and rustfs/backlog#1413. Merge this PR after that dependency.

Closes rustfs/backlog#1414

Related: rustfs/backlog#1409, rustfs/backlog#1381, rustfs/backlog#1361

@cxymds
cxymds merged commit 3a566e7 into main Jul 24, 2026
17 checks passed
@cxymds
cxymds deleted the cxymds/feat-replication-metrics-truth branch July 24, 2026 17: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.

1 participant