Repository navigation
fix(replication): support permanent site decommissioning - #421
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 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
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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 --yespreviews the current topology and executes only the dedicated durable removal v2 route with the returned operation ID and preflight token.--allrequires explicit--decommissioned-siteexclusions, 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.