Repository navigation
Description
Summary
Delete markers carrying a version-purge status (created by ILM NoncurrentVersionExpiration / purge flows) never reach the Completed exit in replicateDeleteToTarget. Each scanner cycle re-probes the target, gets a deterministic 405, falls through to a RemoveObject the delete-on-replica guard blocks, and the version is re-queued. Infinite loop, and every 405 is a protocol success, so no error counter moves.
Mechanism (cmd/bucket-replication.go, replicateDeleteToTarget)
- Delete-marker replication starts with a versioned
StatObjecton the target; a 405 means "marker already present", treated asCompleted. - The exit is gated on
dobj.VersionID == "" && rinfo.VersionPurgeStatus.Empty()— purge-status markers fail the gate. - Fall-through to
RemoveObjecton the target; the delete-on-replica guard (cmd/erasure-object.go,markDelete = false) refuses it: deletions only travel source→replica. - Status stays non-
Completed→ re-queued → next scanner cycle. Deterministic outcome, never converges.
Measurements (site-replication mesh, LOSF, 84M versions, ~86 min scan cycle, ~20M versions stuck from the day ILM rules deployed)
- 706M replication requests in 48h (~4,100 qps), 96.8% answered 405, ~3% legitimate 2XX.
- Model matches:
stuck_versions × 86,400 / scan_cycle ≈ 343M/day ≈ 685M/48h. - Probe rate = scan_rate × stuck_fraction: a scaling phenomenon, no threshold; slowing the scanner divides the storm, fixes nothing.
Suggested fix
- Make the 405 probe terminal for delete-marker ops regardless of purge status:
case isErrMethodNotAllowed(serr):
rinfo.ReplicationStatus = replication.Completed
if dobj.VersionID != "" && !rinfo.VersionPurgeStatus.Empty() {
rinfo.VersionPurgeStatus = replication.VersionPurgeComplete
}
return rinfo- General rule: never re-enqueue on a deterministic response (405 here; the 404 probe case is already terminal). Only transient errors (network, 503 SlowDown, quorum loss) justify re-queueing.
- Observability: replication counters per response code (405 especially) and a gauge of versions with non-
Completedstatus older than N hours. Neither exists natively today.
Full write-up: https://pepitedata.com/minio-site-replication-405-delete-markers/
Activity
[-][bugfix] infinite loop with ILM + replication of delete marker and HTTP405[/-][+][bugfix] infinite loop with ILM + replication of delete marker and HTTP-405[/+]Vonng commentedon Sep 15, 2026
Resolution update: the reproduced delete-marker purge defects have been addressed in two merged changes.
d1105bbb) corrected the initial single-object DELETE classification and source-side purge completion.40220bd836cb) completed the follow-up work on purge retries and persisted MRF recovery. A marker's earlier creation status no longer suppresses a pending purge; results update the purge state while preserving creation metadata. Recovery accepts a marker lookup's 405 response only when its bucket, key, version and timestamp identify the expected marker, then schedules the required deletion.A 405 showing that a marker exists is not treated as proof that permanent deletion succeeded. The regression tests check retry behavior and the resulting source and target state, including recovery from persisted MRF entries. The follow-up proposal in #184 has been closed in favor of the merged implementation.
Documentation:
As of September 16, these fixes are on
mainand are not included in ServerRELEASE.2026-09-03T13-18-01Z. Final artifact and multi-process acceptance is tracked in #203.