Skip to content

dht: coalesced lag sweeps have no counter #1811

Closed

Description

@thiras

Surfaced by the review of #1806 (issue #1561).

decdn_dht_republish_lag_sweeps_total increments on every Lagged, before the single-flight claim. That placement is deliberate — it is what makes a wedged sweep slot diagnosable — and #1806 corrected the docstring and the ADR row to say the counter measures lag events rather than store walks.

What is still unmeasured is the split. A lag that folds into an in-flight sweep's next pass is visible only as a debug! line, so there is no way to tell from metrics whether the counter is climbing because commits keep outrunning the scheduler, or because one long store walk is absorbing a burst.

Suggested fix

A sibling counter, per the siblings-not-labels convention in adr/appendix-observability.md § Reason splits:

  • decdn_dht_republish_lag_sweeps_coalesced_total — lags folded into an already-running sweep.

lag_sweeps_total − coalesced_total then gives the number of sweeps actually started, and a coalesced rate that tracks lag_sweeps_total one-for-one is the signature of a slot that is never being released.

Testability

This also unblocks a test for the coalescing behaviour itself, which is currently unasserted. The existing run_republish_lag_sweeps_the_cache_back_into_the_scheduler harness already produces repeated Lagged; with the counter it can assert that coalescing folds them rather than stacking walks. Without an observable signal, a concurrency-observing test costs more than it returns.

Activity

  1. added
    rust
    prio:low
    on Aug 24, 2026
  2. self-assigned this
    on Aug 24, 2026
  3. moved this from Backlog to In progress in deCDNon Aug 24, 2026
  4. moved this from In progress to Done in deCDNon Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

prio:lowrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions