Commit Graph
1547 Commits
Author SHA1 Message Date
pingqiuandClaude Fable 5.2 9853ea8f10 Merge branch 'main' into fix/chunk-dirty-threshold-help
Resolve the conflict in the ProviderConfig comments: keep main's new DetachFreezeTimeout field and the corrected ChunkDirtyThreshold comment.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 03:06:52 -08:00
Ping Qiu 7dc34b0197 Merge pull request #254 from seaweedfs/test/dtb-b1-exited-holder
master: test the exited-holder recovery path (forced move, then delete)
2026-11-19 02:56:48 -08:00
Ping Qiu 21c66a1c21 Merge pull request #231 from seaweedfs/fix/volume-create-capacity-limit
volume: refuse creation above 16 TiB minus 4 KiB
2026-11-19 01:54:40 -08:00
pingqiuandClaude Opus 5.5 966384d2a8 master: give the exited-holder test room after the lease horizon
The test waits out the real ~45 s horizon; a 60 s budget left ~15 s for
the takeover, cut, detach and delete, which load and -race exceeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:48:55 -08:00
pingqiuandClaude Opus 5.5 898c0fd046 master: test the exited-holder recovery path (forced move, then delete)
A holder that exits never detaches or ACKs, so its live authority keeps
a volume delete refused. The existing path recovers it: after the lease
horizon plus skew a forced move grants epoch+1 on another host, which
claims HEAD, serves the last cut and writes past it, then detaches with
a clean ACK, after which the delete is admitted and later renewals and
moves are refused. Real master runtime and providers, in-memory remote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:48:55 -08:00
Ping Qiu a6ff3002fd Merge pull request #232 from seaweedfs/fix/detach-abort-resume
durable: a failed detach never leaves the guest frozen (MIGRATION E4)
2026-11-19 01:40:46 -08:00
Ping Qiu f353f605c1 Merge pull request #247 from seaweedfs/test/227-lease
test: workspace-lease family waits by progress, not wall-clock bounds (#227)
2026-11-19 01:07:33 -08:00
Ping Qiu 4c9714b49b Merge pull request #244 from seaweedfs/fix/lease-refusal-race
authority: read the lease view under leaseMu in the renewal refusal (#242)
2026-11-19 00:50:19 -08:00
pingqiu 608046e6cb fix: refuse missing open-only volumes before fresh sidecars 2026-11-19 00:33:10 -08:00
pingqiuandClaude Opus 5.5 7116f6dbf8 test: #247 review fold: release before join; credit only renewals started under the hold
- master slow store: each held Put takes a generation; a renewal is credited
  with the generation it read before its call, so a reply computed before
  the hold never releases it. slow.release() runs as the first cleanup, so a
  held Put cannot block the publisher/extender joins after a failure.
- authority WritersExtendersClose: only grants of calls that started after
  the extension write was held count (flag set before the hold blocks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 00:02:05 -08:00
pingqiuandClaude Opus 5.5 9f46fb8d7d test: workspace-lease family waits by progress, not wall-clock bounds (#227)
- core/host/master TestWorkspaceLeaseGuardSurvivesSlowAuthorityStore: each
  lease write is held until a renewal succeeded during the hold (slowness by
  progress), three held writes must complete, a sampler records any fence;
  replaces the 2.5 s sleeps and the 10 s watch. A renewal that waited for the
  store would let the guard lapse and fail the test at once.
- TestWorkspaceHeldRenewalBoundary, TestWorkspaceMoveRestoresLazilyAndFencesOldHost:
  the test context has no wall-clock bound (3 s / 10 s); each step completes
  or the go test timeout reports the hang. The guard's own RPC timeout stays.
- core/authority TestWorkspaceLeaseConcurrentRenewalsWritersExtendersClose:
  wait for the held extension write and for renewals under it by progress
  (were 5 s / 2 s bounds); joins after release unchanged.
- waitExtenders joins the finite extenders without a 10 s bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 23:41:12 -08:00
pingqiu 4055e403ea test: cover open-only geometry and disappearance race 2026-11-18 23:38:06 -08:00
pingqiu d102a1c1a3 fix: admit geometry only when creating durable storage 2026-11-18 23:37:14 -08:00
pingqiu 1e5fe198e3 test: preserve existing-volume create-geometry compatibility 2026-11-18 23:36:38 -08:00
Ping Qiu 325c7555f7 Merge pull request #230 from seaweedfs/fix/manifest-base-group-scan
chunkstore: partition base references once for manifest preparation
2026-11-18 23:34:57 -08:00
pingqiuandClaude Fable 5.2 3e6e0c9603 blockvolume: correct the --chunk-dirty-threshold help text and comment
The flag help and the ChunkDirtyThreshold comment still described the
cut as it was before copy-before-write: "bound on one cut's barrier
copy" and "0 = unbounded".

Since the chunk copy moved out of the barrier, the value is the number
of candidate chunks above which a cut pre-copies (stages) chunks before
its barrier, in rounds of that size, and 0 disables pre-copy
(chunk_layer.go, stage: a bound <= 0 returns without staging).

Text only. No behaviour change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-18 23:13:32 -08:00
pingqiu a9a2cfa936 style: group create-admission imports 2026-11-18 23:10:20 -08:00
pingqiu 9e809120f4 fix: admit original geometry before every durable create 2026-11-18 23:08:47 -08:00
pingqiu c4a37fd4a0 test: cover create admission callers and legacy retry 2026-11-18 23:07:15 -08:00
pingqiuandClaude Opus 5.5 01a118036f authority: read the lease view under leaseMu in the renewal refusal (#242)
The no-host-validity refusal in RenewWorkspaceLease formatted its error
from lv.d.horizon after releasing leaseMu, while the extender
(refreshLeaseViewLocked) rewrites the view under leaseMu: a data race.
The horizon is now read before the unlock.

Test: TestWorkspaceLeaseRefusalReadsTheViewUnderTheLock drives the
refusal while the view is republished concurrently; under -race it fails
on main (workspace_lease_view.go:174) and passes here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 23:00:20 -08:00
pingqiu 254f6ba7ee chore: keep public PR changes to implementation and tests 2026-11-18 22:57:12 -08:00
pingqiu 6de4d89a98 chore: keep public PR changes to implementation and tests 2026-11-18 22:57:06 -08:00
pingqiu bdeb3faf5e docs(geometry): state the block-size assumption behind the byte cap 2026-11-18 22:29:44 -08:00
Ping Qiu 367617c14b Merge pull request #222 from seaweedfs/fix/v3-local-pressure-sync
fix: reclaim native WAL under pressure without guest Flush
2026-11-18 22:15:34 -08:00
pingqiuandClaude Opus 5.5 0a35653775 docs: keep the detach invariant rows off the public PR (archived on the share)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:09:41 -08:00
pingqiuandClaude Opus 5.5 89f0ca8b30 durable: detach review fold 2: forced failed-drain branch, recorded deadlines, handshakes, mapping order, invariants
- Test-only hooks: DetachVolume's StopIO can be replaced (the repeat and
  retry tests now force and observe the failed-drain branch instead of
  racing a cancelled context against a finished drain); the detach's cut
  and settlement deadlines are traced (the budget test checks 3/4 of the
  freeze, then the bound); the backend signals an I/O passing its
  readiness check right before the I/O lock (the drain test's arrival
  handshake replaces a 100 ms non-completion window, with bounded
  receives).
- The delayed detach CAS worker is joined, bounded, also on failure.
- chunkErrorCode: the detach sentinels decide before a catalog-error
  cause; the table rows now discriminate that order (no storage CAS
  sentinel behind them).
- Invariants: INV-WS-DETACH-ABORT-001 and INV-WS-DETACH-FREEZE-001, and
  the M4 transition Holder (detaching) -> Holder.
- Mutants (declared, 10/10): plus a catalog cause deciding before the
  sentinels; the whole-budget cut is now caught by the deadline check too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:52:14 -08:00
pingqiu ebe1b0bd13 test: include reproducible manifest scaling qualification checker 2026-11-18 21:50:16 -08:00
pingqiu f9d9efc418 test(chunkstore): observe refused fork claims through snapshot deletion 2026-11-18 21:42:06 -08:00
pingqiu 5892e35217 fix(chunkstore): refuse oversized inherited fork geometry before claiming 2026-11-18 21:36:07 -08:00
pingqiu 1afc5ac00b test: correct fork capacity fixture lookup error binding 2026-11-18 21:31:34 -08:00
pingqiuandClaude Opus 5.5 f9a8b5daab durable: detach review fold: settle every failure before resuming; one freeze budget
- P1: every failed detach is settled before anything resumes, a failed
  drain included. A repeated detach after a successful one (or with a
  cancelled context) returns the first result and stays stopped, and a
  retry over an unresolved detach CAS stays stopped while the outcome is
  unknown. The StopIO failure path used to resume unconditionally.
- P1: one freeze budget covers the drain, the final cut and the
  settlement (the cut gets three quarters, the settlement the rest); the
  settlement no longer adds 10 s of its own. The bound is cooperative
  (contexts), as documented.
- P2: the resume does not restart the periodic cuts after a concurrent
  Close (or a replaced layer); ErrDetachOutcomeUnknown maps to
  outcome_unknown explicitly, before its cause.
- Tests: the two P1 cases and the budget case (red on 26426dd5: resumed a
  detached volume, resumed over an unknown CAS, 10.4 s for a 400 ms bound);
  a detach CAS genuinely delayed until after the cancel then fails its
  precondition; the drain test now checks that the resumed write queues
  behind the admitted one and that recovery succeeds.
- Mutants (declared, 9/9): plus a failed StopIO resuming without the
  settle, the settlement with time of its own, the cut taking the whole
  budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:30:54 -08:00
pingqiu dcf574ffd5 test(chunkstore): require new forks to respect the volume capacity cap 2026-11-18 21:21:23 -08:00
pingqiu b59e690969 docs: align create admission table diagram and model scope with capacity bound 2026-11-18 21:17:00 -08:00
Ping Qiu 8e5f913a4a Merge pull request #225 from seaweedfs/fix/cow-cut-spill-cap
storage: cap the cut COW spill file; a save past the cap aborts the cut (#216 follow-up P3)
2026-11-18 21:16:27 -08:00
pingqiu 7a1f9826fc chore: preserve original UTF-8 text and group shared geometry imports 2026-11-18 21:13:30 -08:00
pingqiuandClaude Opus 5.5 26426dd50e durable: a failed detach never leaves the guest frozen (MIGRATION E4)
DetachVolume stopped guest I/O, then ran the whole final cut; on any
error I/O stayed stopped for the process, even when nothing was
published, and the only bound was the caller's context (up to 5 min).

Now:
- The freeze (drain + final cut) is bounded by DetachFreezeTimeout
  (default 20 s, below the host's 30 s I/O timeout); a freeze past the
  5 s target is logged as an ALARM.
- A detach that provably did not publish (the drain or the cut failed
  before its CAS, the CAS was refused, or an unresolved detach CAS was
  cancelled) resumes serving: periodic cuts restart, the stop is lifted,
  and ErrDetachAborted (HTTP detach_aborted, 409, retryable) is returned.
  The dirty set stays dirty, so the next cut publishes it.
- The new ChunkLayer.SettleDetach decides an unresolved detach CAS: if
  HEAD is still that CAS's base, a CAS at the same base to the
  non-detached base image (this holder, this epoch) cancels it, so the
  detach can never land afterwards; HEAD carrying the detach means it
  applied (the detached result is returned, I/O stays stopped); a newer
  holder means fenced (stays stopped); HEAD unreadable leaves it
  undecided: ErrDetachOutcomeUnknown, I/O stays stopped. Never resume on
  top of a possibly detached HEAD.

Tests: failed upload, refused CAS, lost unapplied CAS (cancelled, HEAD one
generation on, not detached) resume and the next cut publishes the dirty
blocks; an applied CAS whose reply was lost (found by the cut's re-read or
only by the settle) stays detached; undecidable and fenced stay stopped; a
hung CAS ends at the freeze bound, is settled and resumes; the old
drain-timeout test flips (it asserted I/O stays stopped). Six declared
mutants each turn exactly their declared tests red.

Known limit: after an abort whose drain is still pending (an admitted I/O
stuck), new I/O queues behind that admitted I/O (the drain holds a pending
ioMu.Lock); serving resumes once it completes, not instantly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:12:57 -08:00
pingqiu f00dcdbb08 docs: record volume create capacity invariant 2026-11-18 21:10:38 -08:00
pingqiu cfdb77f855 test: quiesce flusher before WAL-only simulated crash 2026-11-18 21:10:29 -08:00
pingqiu f67517f2e4 fix: refuse volume creation above the uint32 LBA capacity limit 2026-11-18 21:09:12 -08:00
pingqiu 8f377a2f17 test(csi): refuse oversized capacity before provisioning 2026-11-18 21:07:46 -08:00
pingqiu 766596ffd7 docs: record manifest base partition cost invariant 2026-11-18 21:07:15 -08:00
pingqiu 1f36db305f fix(chunkstore): partition base manifest chunks once per preparation 2026-11-18 21:06:23 -08:00
pingqiu 75725d6b32 test: require volume capacity refusal at create boundaries 2026-11-18 21:04:21 -08:00
pingqiu fcb170c8d8 test(chunkstore): measure unchanged manifest group scaling 2026-11-18 21:00:46 -08:00
Ping Qiu 8b5b5b98ec Merge pull request #224 from seaweedfs/fix/cow-cut-pause-timing
storage: cut barrier pause counts the lock wait; report LockWaitNs (#216 follow-up P2)
2026-11-18 20:55:31 -08:00
pingqiuandClaude Opus 5.5 ea0b8955dc storage: cap the cut COW spill file; a save past the cap aborts the cut (#216 follow-up P3)
Past the 64 MiB in-memory budget a copy window spills saved chunks to a
sparse side file next to the volume, with no byte limit: under a long copy
and steady writes it could fill the filesystem under the WAL/extent.

New chunkLayerConfig.COWSpillLimit (bytes; 0 defaults to 1 GiB, negative
refused at attach). A save that would take the side file past it aborts the
window (errCutCOWAborted, the caller retries the cut) instead of writing;
the guest write still completes.

Tests: a save past the cap aborts the cut, the write completes and no side
file is written; a spill within the cap is accounted (one chunk) and the cut
completes; the default applies and a negative cap is refused. Four declared
mutants (no cap, no accounting, no default, negative accepted) each turn
exactly their declared tests red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 20:39:50 -08:00
Ping Qiu 7e39a9ce32 Merge pull request #223 from seaweedfs/fix/cow-cut-no-remote-wait
storage: cut COW never fetches under a guest write (#216 follow-up P1)
2026-11-18 20:33:16 -08:00
pingqiu 9c65af4c5a test repro: record goroutines at no-Flush admission timeout 2026-11-18 20:25:52 -08:00
pingqiuandClaude Opus 5.5 bc5e3e6446 storage: P2 review fold: Lock-request handshake, bounded test helper, design wording
- A test-only hook right before the capture barrier's Lock request; the
  pause tests hold the barrier shared for 300 ms after that handshake (not
  after admission plus a sleep), so the cut provably waited at its Lock and
  pre-barrier time is excluded.
- The helper releases the shared hold on every path (also on a failed
  assertion) and joins the cut within a bound.
- Design docs: barrierPauseNs runs from the Lock request and includes
  lockWaitNs.

Mutants (declared, 4/4): pause timed after the Lock, lock wait unset, body
drops the field, the hook fired after the Lock (no handshake).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 20:22:30 -08:00
pingqiu e1abfa4aee test: observe pressure lock progress before physical fsync 2026-11-18 20:09:09 -08:00