A healthy lease admitted beside an urgent fallback lease kept no pacing
(review). The pacing error wrapper now has a test: prefix, cause, no put.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a full or unusable --host-limit-dir only urgent work (the seal at stop)
runs, on the static fallback. Pacing it at BytesPerSecond/FallbackVolumes
(320 KiB/s by default) made detach --plain time out, reported as 'chunk
remote unavailable'. With no shared cap to protect it is not paced now, and
an upload-pacing error says so. Issue 486.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The provider tests wrap the real limiter and record every Admit call
with its time and outcome. Retry gaps are measured between recorded
held-slot refusals, and the first admission after the slot frees is
timed from the release (<= 400 ms); publication is bounded separately.
- The close-race control bounds its wait for Close and joins it from a
cleanup registered before the goroutine starts.
- Wording: a shorter delay range makes a late volume likely, not certain,
to retry first; the seeded one-slot simulation is a regression check,
not a proof of the bound.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A pool file, urgent-pending, signals urgent work on the host. An
urgent cut holds it shared for its lease, and HoldUrgentPending lets a
caller hold it across a stop or a drain. A Normal admission probes it
exclusively without waiting and, while it is held, is refused with
ErrUrgentPending (an ErrSlotsHeld, so the timer waits instead of
failing). Urgent admissions are unaffected.
- blockvolume checks --host-limit-dir before using it and refuses to
start when it is missing or not a directory, under a temporary
directory (/tmp, /var/tmp, /dev/shm, the process temp dir), on a
network file system (NFS, CIFS, SMB2, FUSE on Linux), or already in
use with different host-limit flags.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Status ends a recorded host slot wait once the layer's CutSeq moves
past the one it was recorded under, so a detach's seal (made after the
timer stopped) or an explicit cut clears it; the count is kept.
- A successful cut observed during a slot wait also drops the pending
slot retry.
- Admission that finds the limiter closed after acquiring its pool slot
returns ErrRevoked, not ErrSlotsHeld.
- The provider test witnesses every refused attempt with a timestamp
(at least 8 in 2.5 s, none more than 400 ms apart), then bounds the
admission after the slot frees (400 ms) and publication (5 s)
separately.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A periodic cut refused because every host cut slot is held must be a
wait, not a failure: no backoff, retry after the volume's jitter, and
the wait reported in status. The types the tests name are added; the
behaviour is not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>