Commit Graph
2415 Commits
Author SHA1 Message Date
pingqiu 823a7b9e2d fix: durably regrant expired unchanged owners after forced-move barrier 2026-11-21 20:56:09 -08:00
pingqiu 1a623b38a4 Merge remote-tracking branch 'origin/main' into fix/oss-holder-resume 2026-11-21 20:55:33 -08:00
pingqiu c1033cb8af test: pin regrant to the existing later forced-move skew barrier 2026-11-21 20:10:25 -08:00
pingqiu b2a28dea39 test: match the plain detach result contract 2026-11-21 20:06:34 -08:00
pingqiu 7968ea3904 test: connect expired regrant to sealed reopen and local WAL return 2026-11-21 20:06:15 -08:00
pingqiu 8120d0102d test: require the full skew barrier before same-holder regrant 2026-11-21 20:04:44 -08:00
Ping Qiu 0dd882d419 Merge pull request #389 from seaweedfs/train/20261122-15
train 15: host-slot wait for timer cuts, upload reuse after an aborted cut
2026-11-21 19:53:47 -08:00
pingqiu 27f8c2967e test: require durable expired same-holder lease re-grant 2026-11-21 19:05:46 -08:00
pingqiu 38dc7d6702 Merge PR #386 2026-11-21 19:01:05 -08:00
pingqiu 0cff342c48 Merge PR #385 2026-11-21 19:01:05 -08:00
pingqiu 28b16cf92f Merge PR #381
# Conflicts:
#	docs/design/invariants.md
2026-11-21 19:01:05 -08:00
Ping Qiu 1f050ea61a Merge pull request #388 from seaweedfs/train/20261122-14
train 14: row splits batch 3, stop admission-cutoff log, capture floor variable, fsck warning
2026-11-21 18:54:14 -08:00
pingqiu e6417e6e9d Merge PR #387 2026-11-21 18:16:43 -08:00
pingqiu 30289edb90 Merge PR #383 2026-11-21 18:16:43 -08:00
pingqiu 6c7d87b645 Merge PR #379
# Conflicts:
#	docs/design/invariants.md
2026-11-21 18:16:43 -08:00
pingqiu b3dd906c33 Merge PR #380 2026-11-21 18:16:36 -08:00
pingqiuandClaude Opus 5.5 5991507beb docs: status schema lists Chunk.CutSchedule
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 18:12:31 -08:00
pingqiuandClaude Fable 5.2 8c154f7de0 docs: SeaweedFS maintenance commands that destroy walstore-chunk volumes
A walstore-chunk volume's data is held in needles that no file's chunk
list names, so volume.fsck with its delete flags would remove it. The
operator document now says which commands must never run on such a
cluster, which only report, and which are safe.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 18:10:37 -08:00
pingqiu fc7d7eb13f test(storage): leave ledger update to shared docs follow-up 2026-11-21 17:57:26 -08:00
pingqiuandClaude Opus 5.5 f83bb48a7a docs(invariants): leave INV-CUT-STAGED-REUSE-001 unchanged in this test-only change
A TEST change may not touch the ledger; the row's Tests cell is updated
in a separate docs change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:55:48 -08:00
pingqiuandClaude Opus 5.5 56d8f086ba Merge origin/main into fix/cut-host-slot-wait; slot-wait tests take HEAD's generation at open as the baseline
Opening a volume on an empty remote now publishes HEAD generation 1 (the
open claim), without a cut. The slot-wait tests read HEAD after open and
check it does not move while the slot is held, and that no admission
succeeded then; publication and the seal are checked against that
baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:45:40 -08:00
pingqiuandClaude Opus 5.5 78d5b5e5f2 storage: the revoke-reuse test counts every PUT attempt before the fake
A re-send of an already completed key is now counted before the fake
remote sees it (the real put path reconciles such a re-send), and the
test asserts no completed key is re-sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:43:14 -08:00
pingqiu 534d141a67 Merge remote-tracking branch 'origin/main' into docs/invariants-split-batch3 2026-11-21 17:41:54 -08:00
pingqiu d402aa112b docs(storage): link mid-upload cancellation regression to reuse invariant 2026-11-21 17:41:20 -08:00
Ping Qiu 92b9293ac0 Merge pull request #382 from seaweedfs/train/20261122-13
train 13: durable-root sizing doc, row splits batch 2, spec bounds table
2026-11-21 17:41:12 -08:00
pingqiuandClaude Opus 5.5 7d56ce0324 docs(invariants): INV-CUT-STAGED-REUSE-001 lists the MaxHold revocation test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:40:03 -08:00
pingqiu 14facd1169 test(storage): count retained upload bytes after a mid-cut abort 2026-11-21 17:37:30 -08:00
pingqiuandClaude Opus 5.5 13b1f154e3 storage: test that a cut revoked mid-upload keeps its uploads
A cut whose host budget is revoked after two of five chunk PUTs (the
limiter's MaxHold abort) leaves HEAD unchanged; the next cut uploads only
the three chunks not yet uploaded, retransmits nothing, and publishes
the full image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:36:42 -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 8fe90ba66d blockvolume: the capture-interval floor is a package variable
Replace the build-tagged constant with durable.MinCaptureInterval
(default 5 minutes). The flag check and the flag help read it; a
program that builds blockvolume with a shorter floor sets it before
parsing flags. The OSS binary behaves as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:23:20 -08:00
pingqiuandClaude Opus 5.5 e94dbbafd6 durable: slot retry delay is random per attempt and shrinks with lateness
A timer cut refused for held host slots retries after a delay drawn
below 200 ms x interval/(interval+late), so the volume furthest behind
its interval retries soonest; a fixed per-volume phase let the same
volumes win every round. A deterministic test runs V timer policies
against one slot (service T, all due at once) and checks no volume
waits longer than (V-1)(T + poll + 200 ms) and every volume keeps
cutting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:19:00 -08:00
pingqiuandClaude Opus 5.5 f8743e62a1 blockvolume: the capture-interval floor lives in a build-tagged file
The 5-minute --chunk-capture-interval floor moves to capture_floor.go,
built unless the swb_enterprise tag is set; a build with the tag supplies
its own minChunkCaptureInterval. The OSS build behaves as before: below
5m is refused (60 s now tested), and the refusal and the flag help name
the floor from the constant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:14:57 -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
pingqiu 29a5b4f94c Merge remote-tracking branch 'origin/main' into test/stopio-began-log
# Conflicts:
#	docs/design/invariants.md
2026-11-21 17:09:46 -08:00
pingqiuandClaude Opus 5.5 93471b8007 invariants: INV-STOP-FLIP-CUTOFF-001 in the Part B table beside INV-CUT-PLAIN-DETACH-001 (was in Part A's M5 table)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:09:31 -08:00
pingqiu ab3b203064 Merge PR #372 2026-11-21 17:07:35 -08:00
pingqiu 3ab9218728 Merge PR #376 2026-11-21 17:07:35 -08:00
pingqiu c575469054 Merge PR #373 2026-11-21 17:07:35 -08:00
pingqiuandClaude Opus 5.5 e2cc37cfd9 durable: the logged boundary is the backend's admission flip itself (recorded under mu), not a time before the call
StorageBackend records stopFlipAt under mu right after operational goes
false (setOperationalLocked and both TryStopIO flips); the detach logs it
as 'admission closed at' beside 'StopIO returned at'. Admission is
unchanged: an I/O whose gate ran before the flip is admitted and drained
by StopIO; every gate after it refuses (INV-STOP-FLIP-CUTOFF-001). The
stamp is taken after the store (errs toward a false alarm) and logged
only on a successful stop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:03:28 -08:00
pingqiuandClaude Opus 5.5 57e30e11c0 durable: a timer cut refused for held host slots waits instead of backing off
Host admission is a try-lock. With one cut slot per host, every volume
whose timer fires while another volume's cut holds the slot was refused
and backed off 1 s doubling to 30 s, adding up to 30 s to its interval
and favouring whichever volume happened to win.

hostlimit returns ErrSlotsHeld (an ErrBusy) when every slot is held. The
cut policy treats that refusal as a wait: no backoff, no minimum
spacing, the timer is not reset, and the retry comes after the volume's
stable slot jitter (at most 200 ms). Other errors, an oversized payload
or an unusable pool included, keep the backoff. Status reports
CutSchedule.HostSlotWaits and HostSlotWaitSinceNs, the start of the
current wait (0 when not waiting). Ledger row INV-CUT-TIMER-SLOT-WAIT-001.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 16:58:33 -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 a4ca4867de Merge branch 'docs/invariants-split-batch2' into docs/invariants-split-batch3
# Conflicts:
#	docs/design/invariants.md
2026-11-21 16:49:44 -08:00
pingqiuandClaude Fable 5.2 705656010b docs(invariants): one property per row, third batch (local WAL store)
Seventeen over-long rows of the local WAL store (format v3) become 92 rows
that state one property each, every statement at most 300 characters.
Clauses that only repeated a Part A transition guard point to that
transition; the write-admission wait gets its line in the table of bounded
waits. The long-statement list shrinks from 18 to 1.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 16:49:29 -08:00
pingqiuandClaude Fable 5.2 f6b3b3e34d docs(spec): bounds rows for the three reopen and seal specs
HeadReopenBelt, PlainSealReplay and SealedReopen arrived on main with
their results in the README; each gets its Exhausted bounds row from those
figures. Nothing re-run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 16:48:29 -08:00
pingqiu 26ef627088 Merge remote-tracking branch 'origin/main' into ci/spec-bounds-check 2026-11-21 16:48:13 -08:00
pingqiu e99c9a8a37 Merge remote-tracking branch 'origin/main' into docs/invariants-split-batch2
# Conflicts:
#	docs/design/invariants.md
2026-11-21 16:47:19 -08:00
Ping Qiu b4633efd2c Merge pull request #374 from seaweedfs/train/20261122-12
train 12: HEAD reopen claim + expected-server slot facts
2026-11-21 16:46:32 -08:00
pingqiuandClaude Fable 5.2 f2cdd75f8d docs(invariants): one property per row, second batch
Eleven over-long rows (authority store, workspace lease, forced move and
lost range, operator confirmation, frozen-request validation, host cut
budget, replica per-LBA rule, RF=3 promotion) become rows that state one
property each, every statement at most 300 characters. Clauses that only
repeated a Part A transition guard now point to that transition. 185 rows
become 216; the long-statement list shrinks from 28 to 18.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 16:27:03 -08:00
pingqiuandClaude Opus 5.5 76e56fc6cd durable: log when a detach's I/O stop began (the operational flip), next to when StopIO returned
A guest error after the flip is a refusal by contract; only an error on
I/O admitted before the flip is a data-path failure. The detach now logs
'I/O stop began at' (taken just before the flip: plain stop, live
StopIO, or the pre-copy TryStopIO) beside 'StopIO returned at', both
RFC 3339 nanoseconds, so a measurement can count from the flip (#375).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 16:25:45 -08:00
pingqiuandClaude Opus 5.5 089373518a durable: test: a detach logs when its I/O stop began
Red on main: only 'StopIO returned at' is logged, so a test measuring
guest errors cannot tell a refusal after the operational flip (by
contract) from an admitted I/O that failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 16:25:22 -08:00