- A fetch-only start must publish and check the host configuration: a
child process with FetchSlots 2 fetches first, and a FetchSlots 1 fetch
must answer ErrConfig (fails: no configuration is published).
- Waits that end at their deadline, or by taking another slot, must leave
no goroutine or descriptor behind while their slot stays held (fails: 40
blocked lock waits remain).
- A context that ends as a slot is taken must get its error, slot given
back (fails: the slot is handed over). Seam: testFetchLocked.
- Controls: a killed child's slot is freed; a waiter passed by others ends
by its deadline (the waiting is unordered, bounded by the context).
- The same-process cap test is renamed AcrossLimiters; holdAsync joins and
releases its wait in cleanup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seams: Config.FetchSlots (default 64), fetchSlot (a key's hash slot),
Limiter.HoldFetch (no cap yet) and storage.BudgetFetch.
- TestHoldFetchCapHoldsAcrossProcesses: with every slot held by other
processes, a fetch waits until one is released, then takes it. Fails here.
- TestHoldFetchAWaiterThatGivesUpLeavesNoSlotHeld: a waiter past its context
returns the context's error, and a slot it gets after is released at once.
Fails here.
- TestHoldFetchTakesAnotherSlotThatFreesFirst: a waiter behind a slow holder
of its own hash slot takes another slot within one retry interval of its
release. Fails here.
- TestHoldFetchTakesAFreeSlotAtOnce: a fetch with a free slot does not wait
(holds here, must keep holding).
- TestChunkFetchHoldsAHostSlotAroundItsRemoteRead: a chunk fetch holds one
slot exactly across its remote read. Fails here: none is held.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>