Skip to content

feat(rc-replication)!: add a bounded prefix replication diff#287

Merged
cxymds merged 2 commits into
cxymds/issue-1363-capabilitiesfrom
cxymds/issue-1409-replication-diff
Jul 22, 2026
Merged

feat(rc-replication)!: add a bounded prefix replication diff#287
cxymds merged 2 commits into
cxymds/issue-1363-capabilitiesfrom
cxymds/issue-1409-replication-diff

Conversation

@cxymds

@cxymds cxymds commented Jul 21, 2026

Copy link
Copy Markdown
Member

Closes rustfs/backlog#1409

Background

RustFS beta.10 exposes an on-demand replication diff route, but rc had no typed or bounded client workflow for it. Operators could not inspect pending or failed object versions without reaching for raw Admin API requests.

Solution

  • add rc replicate diff and rc bucket replication diff with an optional prefix
  • call the exact signed POST /rustfs/admin/v3/replication/diff route with an empty body
  • bound both success and error responses to 8 MiB
  • preserve future server fields while strictly validating required scan fields
  • distinguish unsupported routes from missing buckets or replication configuration
  • add deterministic human/JSON output, output-v3 schema fixtures, process tests, and protected reference documentation
  • report truncated scans as partial and explicitly non-resumable

This PR intentionally does not claim time filtering, resume tokens, replication metrics, MRF truth, or repair behavior.

BREAKING CHANGE

The protected CLI reference contract is extended with the new replication diff command and the output-v3 contract gains the replication family. Existing output-v1 and output-v2 contracts are unchanged.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • independent source/protocol review against RustFS beta.10 and current main

All local checks passed. Live container validation was not run because no Docker daemon is available in the current environment.

@cxymds
cxymds changed the base branch from cxymds/issue-1363-capabilities to main July 21, 2026 18:04
@cxymds cxymds closed this Jul 21, 2026
@cxymds cxymds reopened this Jul 21, 2026
@cxymds
cxymds changed the base branch from main to cxymds/issue-1363-capabilities July 21, 2026 18:04
@cxymds
cxymds force-pushed the cxymds/issue-1409-replication-diff branch from e9ad04d to e424398 Compare July 21, 2026 19:17
@cxymds
cxymds changed the base branch from cxymds/issue-1363-capabilities to main July 21, 2026 19:18
@cxymds cxymds closed this Jul 21, 2026
@cxymds cxymds reopened this Jul 21, 2026
@cxymds
cxymds changed the base branch from main to cxymds/issue-1363-capabilities July 21, 2026 19:18
@cxymds

cxymds commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Validation update for e4243986cc884f578dcd94f15c0249c92bc54645:

The first Windows CI attempt exposed a test-only socket hang in the chunked overflow fixture. The fixture now sends exactly 8 MiB + 1 byte, bounds socket writes and completion waits, and retains the production response-limit assertion. The repaired test passed 10 serial repetitions locally, the full rc-s3 suite, full workspace gates, and the replacement Windows CI job. Production response handling was not changed.

Live RustFS container validation remains unavailable because the current environment has no Docker daemon.

@cxymds
cxymds marked this pull request as ready for review July 22, 2026 12:41
@cxymds
cxymds merged commit 4598490 into cxymds/issue-1363-capabilities Jul 22, 2026
@cxymds
cxymds deleted the cxymds/issue-1409-replication-diff branch July 22, 2026 12:42
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