Commit Graph
439 Commits
Author SHA1 Message Date
pingqiu 93d8e6cce9 Merge main and preserve detach fast-poll and urgent cut admission 2026-11-20 05:23:19 -08:00
pingqiu 6c3687f50a durable: keep final freeze nonblocking across both backend locks 2026-11-20 04:39:34 -08:00
pingqiu d721b69bdc test: final barrier never waits for backend state lock 2026-11-20 04:35:17 -08:00
pingqiuandClaude Opus 5.5 3de728e23d Clear lease stop-pending when a detach aborts and serving resumes
A detach whose final cut provably did not publish resumes serving, but
the stop-pending mark set at the start of the detach stayed latched on
the host and on its lease guard, so a host that kept serving renewed
about four times a second for good instead of once per renewal delay.

The detach hook now returns an attempt token, and the provider calls a
second hook with that token only after it resumed serving on a proven
abort. The host clears stop-pending, on itself and on its guard, only
for the latest attempt, so an older attempt's resume cannot clear a
newer pending detach; an applied, fenced or unknown outcome keeps it.

Tests: the guard's sleep is now observable through a scheduling seam,
so the cadence test asserts the delay chosen after each renewal and the
kick path separately, with no wall-clock window; the detach hook is
witnessed before the drain starts; test workers are joined, bounded and
failing on timeout, before their providers are closed. The invariants
document gains the StopPending mode of the lease guard (scheduling
only, no admission or ACK change) and INV-WS-STOP-PENDING-001. Comments
now say that 250 ms bounds the sleep after a completed renewal, not the
time from a revocation to its ACK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:17:44 -08:00
pingqiuandClaude Opus 5.5 c0297da05a Poll the workspace lease fast once a detach starts
On a graceful stop the chunk layer is detached first and the master marks
the lease revoking right after, but the host's lease guard only learned of
the revocation on its next renewal, up to 10 s later (3-6 s measured), and
the guest's writes were refused all that time.

A detach now calls an optional provider hook, OnChunkDetach, which the
blockvolume host connects to its lease guard: the guard renews at once and
then every 250 ms until it fences. The pending mark is never cleared; a
detached host does not serve again under the same guard. The hook fires
only on the detach path, not on the lease-fence StopIO.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:17:28 -08:00
Ping Qiu a6aeb99e0c Merge pull request #280 from seaweedfs/feat/host-cut-limiter
feat: coordinate host background cuts with shared budget slots
2026-11-20 04:13:31 -08:00
pingqiu 6cefc26f41 storage: bound queued pre-copy by its caller context 2026-11-20 04:06:19 -08:00
pingqiu 0c9ca13a29 storage: retain cancellation and complete barrier timing in pre-copy 2026-11-20 04:02:09 -08:00
pingqiu 1a97fc9638 storage: report freeze and extra CAS failure-path allowance 2026-11-20 03:52:05 -08:00
pingqiu c80613db48 test: cover provider pre-copy drain and refused final settlement 2026-11-20 03:48:07 -08:00
pingqiu 27f1f5beda durable: preserve freeze deadline cause during settlement 2026-11-20 03:44:14 -08:00
pingqiu 6f771c8169 durable: wire opt-in pre-copy into settled detach lifecycle 2026-11-20 03:43:25 -08:00
pingqiu c64244c61d test: tentative freeze never waits for admitted frontend I/O 2026-11-20 03:42:11 -08:00
pingqiu 9a88af11f8 Merge main into HEAD belt and retain both invariant rows 2026-11-20 03:05:48 -08:00
pingqiu 3eda912af8 fix: scope upload pacing and degraded cut admission honestly 2026-11-20 02:41:45 -08:00
pingqiu b621337dc6 Merge remote-tracking branch 'origin/main' into feat/host-cut-limiter
# Conflicts:
#	docs/design/invariants.md
2026-11-20 02:38:04 -08:00
pingqiu 25e60aa27e test: witness permanently held attach resolution with reviewed source unchanged 2026-11-20 02:21:00 -08:00
pingqiu 4a341d1683 fix(durable): preserve caller deadline through bound claim cancellation 2026-11-20 02:07:14 -08:00
pingqiu ad494f7200 test: hold ambiguous outcome lookup during permanent attach outage 2026-11-20 02:06:48 -08:00
pingqiu 257c50e2f2 fix: bound HEAD operations and confirm single-filer claims immediately 2026-11-20 01:59:30 -08:00
pingqiu 271b98eb2c fix(durable): cancel takeover cooling when provider closes 2026-11-20 01:40:49 -08:00
pingqiu dbfa9424ae test(durable): reach a new-epoch claim in close cancellation control 2026-11-20 01:40:18 -08:00
pingqiu 2e764385b7 test(durable): retain backend reference for close probe 2026-11-20 01:37:26 -08:00
pingqiu 1cfc09de45 test(durable): bound provider close during takeover cooling 2026-11-20 01:37:03 -08:00
pingqiu 9759dc02d6 fix(storage): retain takeover cooling across retries and hydration fencing 2026-11-20 01:31:33 -08:00
pingqiu 40f1df163d test(storage): include takeover cooling in restore fixture deadlines 2026-11-20 01:25:04 -08:00
pingqiu 816eb03286 fix(storage): confirm publication from validated root without segment scans 2026-11-20 01:22:57 -08:00
pingqiuandClaude Opus 5.5 3d850aa236 chunkstore: compare filer addresses with their zone; recheck the deadline
isTarget compares resolved addresses with netip (IPv6 zone included);
an address that does not parse never matches. A round whose bound ran
out while a later master was still being asked does not pass on an
earlier favourable answer. The ledger row maps to the M4 table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 01:10:15 -08:00
pingqiuandClaude Opus 5.5 961f08f66e chunkstore: the single filer must be the configured one, on every master
A pass now needs a master listing exactly the configured filer (same
gRPC port, same or co-resolving host). Every master is asked: any
master listing another filer or several refuses at once, whichever
answers first. Each master call is bounded within the remaining time,
so a stalled master no longer consumes the whole bound. Startup census
only; invariant INV-WS-SINGLE-FILER-001 and its M6 row record it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 00:53:13 -08:00
pingqiuandClaude Opus 5.5 7578b34095 chunkstore: wait for the filer to register before refusing
A fresh filer registers with its master some seconds after it serves
(14 s in the swap smoke), so "no filer listed" is asked again every
second until a 60 s bound and refused only then. Several filers are
still refused at once; an unreachable master is retried the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 00:28:23 -08:00
pingqiuandClaude Opus 5.5 a5785ff688 blockvolume: refuse to start unless the chunk filer is the only filer
Block metadata needs exactly one filer behind --chunk-filer. At startup
the chunk wiring asks that filer for its masters and filer group
(filer_pb.SeaweedFiler/GetFilerConfiguration), then the masters for the
filers of that group (master_pb.Seaweed/ListClusterNodes). It refuses
unless a master lists exactly one, and when it cannot get that answer
within 15 s. The filer subset gains GetFilerConfiguration and a master
subset carries ListClusterNodes, generated with the committed plugin
versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 00:20:10 -08:00
pingqiu 66f0413946 fix: keep the initial cut phase within its configured period 2026-11-19 23:45:55 -08:00
pingqiu 8bf7cfd663 fix: stagger first cuts without hiding later explicit success 2026-11-19 23:35:48 -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
pingqiu 1903666200 fix: clean settled roots after provider cancellation 2026-11-19 20:30:37 -08:00
pingqiu f87f513bdf test: cover cut abort status and named snapshot failure 2026-11-19 20:16:35 -08:00
pingqiu 80740d5d80 feat(storage): call the host budget seam at cut and COW admission 2026-11-19 20:16:35 -08:00
pingqiu 34bee24be2 fix(storage): enforce the configured per-volume cut payload budget 2026-11-19 20:16:35 -08:00
pingqiu 0ada41d93c test: verify flat payload memory and the complete submitted image 2026-11-19 20:16:34 -08:00
pingqiu 42e2c872cd test: apply stage geometry to the cut memory arm 2026-11-19 20:16:34 -08:00
pingqiu a7b50b4601 test: expose initial cut and pre-copy memory on a fully written volume 2026-11-19 20:16:34 -08:00
pingqiu 20a44daaa4 test: isolate first-cut memory from write volume and queue depth 2026-11-19 20:16:34 -08:00
pingqiu 8bf62dd189 test: read checkpoint metrics from the concrete WAL store 2026-11-19 20:16:34 -08:00
pingqiu ca7367445e test: sample memory across two volume-equivalents of ledger writes 2026-11-19 20:16:34 -08:00
pingqiu 29ec4e6bbc test: profile live capture payloads at the first remote upload 2026-11-19 20:16:34 -08:00
pingqiu f819404687 test: bound anonymous memory during initial volume writes and cut 2026-11-19 20:16:33 -08:00
Ping Qiu d3316321ee Merge branch 'main' into test/227-part2 2026-11-19 17:29:06 -08:00
pingqiu c253319678 test: retain one deadline across attachment and hydration 2026-11-19 16:03:15 -08:00
pingqiu 7fd4c8491a durable: keep any committed prefix when RMW observes fencing 2026-11-19 16:03:15 -08:00