Skip to content

fix(replication): support permanent site decommissioning - #421

Merged
cxymds merged 3 commits into
mainfrom
cxymds/fix-site-decommission
Nov 18, 2026
Merged

cxymds merged 3 commits into
mainfrom
cxymds/fix-site-decommission

Conversation

@cxymds

@cxymds cxymds commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds explicit permanent site decommissioning for a peer that can no longer acknowledge ordinary site replication removal. rc admin replicate remove ALIAS --site NAME --force --yes previews the current topology and executes only the dedicated durable removal v2 route with the returned operation ID and preflight token. --all requires explicit --decommissioned-site exclusions, and partial cleanup returns a conflict exit code with a resumable operation ID.

Validation

  • cargo fmt --all --check: passed.
  • cargo clippy --workspace -- -D warnings: passed.
  • cargo test --workspace: passed, including six remove-command regressions and the existing site replication transport tests.

Compatibility

Ordinary remove remains unchanged. Unsupported servers are rejected without fallback to legacy removal. Requires the companion RustFS durable removal v2 implementation in rustfs/rustfs#9491 for rustfs/backlog#3211. Configuration cleanup completion does not imply that ordinary objects, historical versions, or Object Lock protections have been removed.

Current CI: format, CLI contracts, Clippy, Linux tests/build, documentation, golden tests, MSRV, and both RustFS smoke checks passed. Dependency Advisories now passed after removing the chrono/humantime dependency paths; The dependency failure is now fixed: replace the unmaintained duration parser while preserving resync unit aliases and wire formatting, and use rc-owned SDK request-capture/replay connectors instead of the AWS test-util dependency chain that pulled in chrono. The dependency advisory gate passed locally and in CI; no advisory exemption was added.

After CI feedback: cargo deny check advisories, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace, and warnings-as-errors workspace documentation all passed. Existing SDK transport tests retained their request/body/response assertions with the rc-owned connectors.

Copilot AI balanced review requested due to automatic review settings November 17, 2026 10:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Destructive execution hides the previewed deletion scope, can lose the operation ID needed to resume after a transport failure, and does not flag uncertain mutation outcomes when responses are malformed or oversized.

3 open issues
What changed in this PR

Adds permanent decommissioning for site-replication peers that can no longer acknowledge removal, while leaving ordinary removal unchanged.

Changes:

  • Adds explicit force confirmation, retired-peer exclusions, and operation-ID resume support.
  • Introduces a dedicated v2 preview/execute protocol with response validation and no legacy fallback.
  • Adds CLI regression tests and documents configuration-cleanup boundaries.
File Description
docs/​site-replication-resync.md Documents decommissioning, retries, and cleanup limitations.
crates/​s3/​src/​admin.rs Implements the removal-v2 request and response validation.
crates/​core/​src/​admin/​site.rs Defines durable removal request and status models.
crates/​core/​src/​admin/​mod.rs Exposes the models and adds the admin API method.
crates/​cli/​tests/​admin_replicate.rs Tests confirmation requirements, v2 execution, partial results, and unsupported servers.
crates/​cli/​src/​commands/​admin/​replicate.rs Adds decommissioning flags and preview/execute handling.

Review effort: Balanced

Comment thread crates/s3/src/admin.rs Resolved
@cxymds
cxymds merged commit 153f402 into main Nov 18, 2026
20 of 21 checks passed
@cxymds
cxymds deleted the cxymds/fix-site-decommission branch November 18, 2026 02:40
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.

2 participants