Commit Graph
26 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 1a77477892 fix(hostlimit): uploads go unpaced only while every live lease is a fallback lease; wrapper test
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>
2026-11-23 01:04:10 -08:00
pingqiuandClaude Opus 5.5 598e8f9899 fix(hostlimit): an urgent cut on the static fallback is not rate-paced; a pacing error names the limiter
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>
2026-11-23 00:53:13 -08:00
pingqiu 2badef77ac Merge remote-tracking branch 'origin/fix/cut-host-slot-wait' into feat/host-urgent-pending 2026-11-21 17:33:48 -08:00
pingqiuandClaude Opus 5.5 23522de145 durable: slot-wait tests record the limiter's own admissions
- 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>
2026-11-21 17:30:02 -08:00
pingqiuandClaude Opus 5.5 2ff59b9529 hostlimit: gofmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:27:48 -08:00
pingqiuandClaude Opus 5.5 14f0d7401f hostlimit: background cuts wait while urgent work is pending; launch checks
- 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>
2026-11-21 17:26:46 -08:00
pingqiuandClaude Opus 5.5 1d861a806c durable: slot wait ends with any later cut; a closed limiter refuses as revoked
- 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>
2026-11-21 17:13:21 -08:00
pingqiuandClaude Opus 5.5 74fab1baf0 durable: tests for timer cuts refused for held host slots (red)
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>
2026-11-21 16:58:15 -08:00
pingqiu fb1fd8eb2b fix: preserve pool lock faults and clear settled fallback status 2026-11-20 03:15:52 -08:00
pingqiu c57d6747a0 test: cover final fallback release and configuration lock faults 2026-11-20 03:15:04 -08:00
pingqiu 3eda912af8 fix: scope upload pacing and degraded cut admission honestly 2026-11-20 02:41:45 -08:00
pingqiu b1124f739e test: expose unavailable-pool policy and process-local pacing scope 2026-11-20 02:39:34 -08:00
pingqiu 44777514cd test: bound subprocess startup separately from guest I/O budgets 2026-11-20 00:16:42 -08:00
pingqiu 22793c7dbb fix: publish host pool configuration atomically across initializer crashes 2026-11-20 00:07:37 -08:00
pingqiu 7899cd9240 fix: expose incompatible pool configuration refusals 2026-11-19 23:40:13 -08:00
pingqiu ebe8fce96b fix: retain degraded sharing while any fallback cut is active 2026-11-19 23:32:54 -08:00
pingqiu acb35d15aa test: hold fallback logging while probing COW accounting progress 2026-11-19 23:11:37 -08:00
pingqiu e6178da9dd fix: log degraded host admission outside the COW accounting lock 2026-11-19 23:10:32 -08:00
pingqiu a9bd557a6c test: close the subprocess admission handshake pipe 2026-11-19 23:09:27 -08:00
pingqiu 66ce87fef6 fix: bound each host slot class before adding counts 2026-11-19 23:06:55 -08:00
pingqiu c0982699ee feat: report host slot admission and hold costs 2026-11-19 23:06:14 -08:00
pingqiu 76445f968e fix: reject ignored or invalid host limiter configuration 2026-11-19 23:04:56 -08:00
pingqiu fc0d75c07c test: settle unexpected limiter admissions on assertion failure 2026-11-19 23:03:53 -08:00
pingqiu 7ba1172b9a feat: isolate background fill and idle admission pools 2026-11-19 22:59:13 -08:00
pingqiu b9e493900c fix: join limiter admission and preserve cancelled upload capacity 2026-11-19 22:56:21 -08:00
pingqiu b1ecbee969 feat: coordinate host cut budgets with shared file-lock slots 2026-11-19 22:53:20 -08:00