Skip to content

feat(replication): structure active check results - #5208

Merged
cxymds merged 1 commit into
mainfrom
cxymds/feat-structured-replication-check
Jul 24, 2026
Merged

feat(replication): structure active check results#5208
cxymds merged 1 commit into
mainfrom
cxymds/feat-structured-replication-check

Conversation

@cxymds

@cxymds cxymds commented Jul 24, 2026

Copy link
Copy Markdown
Member

Related Issues

Closes rustfs/backlog#1417

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

Summary of Changes

  • Return a structured result for every configured replication target and every
    bucket, versioning, object-lock, put, delete-marker, version-delete, and
    cleanup phase.
  • Disclose that the GET extension performs an active temporary mutation and
    publish the reserved probe namespace in the response contract.
  • Allocate collision-resistant keys below
    .rustfs.sys/replication-check/, preflight exact object versions, and use a
    conditional put so user/concurrent objects are never overwritten or removed.
  • Run cleanup after ambiguous writes and later phase failures, continue version
    deletion after delete-marker failures, and report cleanup failure separately.
  • Bound and sanitize remote failures to structured safe codes without exposing
    endpoints, credentials, signed URLs, or raw server details.
  • Preserve successful target results when another target fails and document the
    contract and operator implications.

Verification

  • 108 replication-focused unit tests passed; 2 environment-dependent tests
    ignored.
  • Real two-server replication extension suite: 5 passed, including successful
    cleanup with zero remaining target versions/delete markers and an object-lock
    mismatch that performed no mutation.
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • make pre-commit
  • make pre-pr (all checks passed: 10,299 workspace tests and all doctests)
  • cargo fmt --all --check
  • git diff --check

Adversarial review verdicts:

  • Security/redaction: PASS
  • Correctness/state machine: PASS
  • Concurrency/collision safety: PASS
  • Cleanup/failure recovery: PASS
  • API compatibility: PASS
  • Test quality: PASS
  • Operations/documentation: PASS

Impact

The replication-check success body changes from empty to structured JSON on
RustFS servers. The operation remains a signed S3 GET extension, but its active
temporary mutations are now explicit. Older clients that require an empty body
must be updated; rustfs/backlog#1496 tracks typed rendering plus legacy
empty-body compatibility.

Additional Notes

The reserved namespace and conditional preflight prevent this diagnostic from
deleting an object it did not create. Cleanup errors are deliberately returned
as failed structured outcomes even when the earlier probe phases succeeded.


Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md). If this is your first contribution, review the CLA document and sign it by commenting I have read and agree to the CLA. on the PR.

@github-actions

Copy link
Copy Markdown
Contributor

CLA requirements are satisfied for this pull request.

@cxymds
cxymds merged commit 05caec0 into main Jul 24, 2026
20 checks passed
@cxymds
cxymds deleted the cxymds/feat-structured-replication-check branch July 24, 2026 17:28
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