Skip to content

[bugfix] enforce MRF replication queue capping for real #152

Closed

Description

@julienlau

Summary
The MRF replication queue is effectively uncapped in what operators can observe: on overflow, entries are dropped with no log (default config) and no metric, and recovery falls back to a full scanner pass. A replication lag becomes your real RPO, invisibly.

Mechanism (verified on minio/minio @ 7aac2a2c5, cmd/bucket-replication.go)

  1. When a shard's worker channel is full, queueReplicaTask's default: arm pushes the entry to the MRF queue. Under the shipped default replication_priority=auto this logs nothing (fast/slow log, deduped to ~1 line/hour).
  2. queueMRFSave drops the entry when RetryCount > mrfRetryLimit (3) or when mrfSaveCh is full at its 100000 cap, incrementing TotalDroppedCount / TotalDroppedBytes.
  3. Those counters are write-only: incremented in 4 places, read in 0. getNodeQueueStats / getNodeQueueStatsSummary copy only LastFailedCount, so droppedCount_since_uptime / droppedBytes_since_uptime always report 0, and no Prometheus metric exposes them (neither metrics-v2 nor v3).

Impact
A dropped entry is not lost data (the source keeps its PENDING marker), but nothing re-queues it on a timer: recovery is a background scanner walk, or a client GET/HEAD. The one number that says "replication gave up on this object" never leaves the process.

Suggested fix

  • Populate TotalDroppedCount / TotalDroppedBytes in getNodeQueueStats (+ expose a Prometheus counter).
  • Log overflow under auto, same as fast/slow.
  • Optionally, bounded re-enqueue with backoff instead of relying on the scanner.

Minor, same area: getWorkerCh is called as (ri.Name, ri.Bucket, ...) on the object path and (doi.Bucket, doi.ObjectName, ...) on the delete path — arguments reversed. Harmless for distribution, but it breaks worker affinity for a given object across write/delete.

Full write-up: https://pepitedata.com/minio-replication-silent-drops-monitoring/

Activity

  1. changed the title [-]enforce MRF replication queue capping for real[/-] [+][bugfix] enforce MRF replication queue capping for real[/+] on Sep 7, 2026
  2. moved this from Backlog to In progress in Siloon Sep 9, 2026
  3. moved this from In progress to Done in Siloon Sep 9, 2026
  4. Vonng commented on Sep 15, 2026

    @Vonng
    Member

    This was resolved in PR #162, merged as d1105bbb.

    The existing queue-drop counters are now exposed through the administration statistics and Prometheus v2/v3 endpoints. Queue overflow and retry exhaustion produce deduplicated warnings at the actual drop sites. The change also corrects worker routing so object and deletion work use the same bucket/key ordering.

    The queue remains bounded by its existing capacity and retry limit. The counters measure dropped retry entries, which can include repeated attempts for one object; they are not a count of lost objects. Source data and pending replication state remain available for scanner-based recovery.

    The MRF observability documentation lists the metric names, reset behavior and interpretation, together with the regression evidence.

    Availability: this fix is on main, but is not included in Server RELEASE.2026-09-03T13-18-01Z, still the latest published Server as of September 16. See the component and release matrix; final release acceptance is tracked in #203.

  5. added
    bug
    on Sep 15, 2026
  6. self-assigned this
    on Sep 15, 2026
  7. added theissue type on Sep 15, 2026
  8. added this to the 20260916 milestone on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions