Commit Graph
323 Commits
Author SHA1 Message Date
Ping Qiu 59bf6f06b5 Merge branch 'main' into test/227-part2 2026-11-19 03:05: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
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
pingqiuandClaude Opus 5.5 b5f5076070 test: #227 part 2: progress conditions in durable restore, chunk BASE, v3 flusher tests
- durable TestRestoreWaitsForFirstAssignment / TestRestoreDeferredAssignment
  WaitEndsOnDeadlineAndClose: the 2 s test bounds become progress waits; the
  40 ms ChunkAssignmentTimeout under test is unchanged; the limit poll fails
  at once if the backend becomes operational without an assignment.
- TestWALStoreChunk_ExplicitCutRestartsTheTimer: the final wait for the
  automatic cut is a progress wait; the early-cut window check (with its
  slow-host skip) is the timing assertion and stays.
- storage TestChunkLayerV3_BASEBeginDrainsWholeCut: the held-upload, drain,
  settlement and resume waits are progress waits (were 5 s).
- TestWALStoreV3FlusherWritesTheExtentButHoldsTheCheckpointUntilTheMap: stop
  the automatic flusher before writes, as walstore_test does, so the
  simulated crash cannot race its use of the descriptor ('volume locked').

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:13:44 -08:00
pingqiu 608046e6cb fix: refuse missing open-only volumes before fresh sidecars 2026-11-19 00:33:10 -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
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 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 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 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 f67517f2e4 fix: refuse volume creation above the uint32 LBA capacity limit 2026-11-18 21:09:12 -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
pingqiu 9c65af4c5a test repro: record goroutines at no-Flush admission timeout 2026-11-18 20:25:52 -08:00
pingqiu e6a15049e9 test: preserve active RF2 history across local pressure persistence 2026-11-18 19:28:21 -08:00
pingqiu 7e9f07818a test: cover pressure locks faults pins retry status and native burst 2026-11-18 19:18:12 -08:00
pingqiu 8c16952789 Merge commit 'b6ca5237' into fix/v3-local-pressure-sync 2026-11-18 19:16:53 -08:00
pingqiu 458852ba4f fix: surface bounded pressure as retryable NVMe readiness 2026-11-18 19:16:52 -08:00
Ping Qiu b6ca5237fd Merge pull request #216 from seaweedfs/feat/cut-cow-native
storage: move native chunk cut copying outside the write barrier
2026-11-18 19:16:05 -08:00
pingqiu 761882ba82 Merge native WAL admission fixes into COW cut branch 2026-11-18 17:13:37 -08:00
pingqiu dffda03239 fix: preserve terminal faults in WAL pressure waits and bind burst bytes to full LBA 2026-11-18 16:23:35 -08:00
pingqiu 1ae48b7939 test: expose terminal fault wait and burst pattern lap alias 2026-11-18 16:22:28 -08:00
pingqiu 1534404f7f test: use backend buffer read contract in burst oracle 2026-11-18 14:55:12 -08:00
pingqiu 44eea4ee49 fix: use native v3 WAL pressure for write admission 2026-11-18 14:54:00 -08:00
pingqiu ed23f149e2 test: make COW corruption and batch oracles precise 2026-11-18 12:31:01 -08:00
pingqiu b0ff0c21a6 refactor(storage): remove production C11 file bitmap store 2026-11-18 08:14:18 -08:00
Ping Qiu 56af794492 Merge pull request #197 from seaweedfs/feat/walstore-format-v3
storage: walstore format bump v3 (#51, #189)
2026-11-18 08:07:17 -08:00
pingqiu d4ebc48ef7 test(durable): handle caller expiry before recovery reaches the remote 2026-11-18 06:15:52 -08:00
pingqiu a81bca4926 feat(storage): activate mapped v3 through the production storage callers 2026-11-18 03:49:47 -08:00
pingqiu 238aa54b02 fix(durable): withhold chunk publication until owner attachment commits 2026-11-17 21:06:20 -08:00
pingqiu 16c913e32b fix(durable): retain BASE until provider attachment is durably committed 2026-11-17 20:53:02 -08:00
pingqiu fd2ea05307 fix(durable): defer BASE retirement until local presence is durable 2026-11-17 20:35:12 -08:00
pingqiu 12e9536674 test(durable): retain real batch caller and reopen completed local BASE 2026-11-17 18:06:42 -08:00
pingqiu d4230194e3 feat(storage): coordinate mapped chunk capture with BASE transitions 2026-11-17 17:50:30 -08:00
pingqiu ae23ba8a05 feat(storage): validate dark v3 readonly images and provider status 2026-11-17 15:44:54 -08:00
pingqiu d977a8b718 test(durable): verify seeded takeover and lost-response restore on mapped v3 2026-11-17 15:31:17 -08:00
pingqiu c7d0ff5494 feat(durable): restore mapped v3 provider from HEAD through verified seed 2026-11-17 15:30:05 -08:00
pingqiuandClaude Opus 5.5 09d1663f13 feat(storage): v3 SeedChunkFrontier through the one checkpoint publication (row 9c)
Plan row 9: SeedChunkFrontier uses the checkpoint's map/metadata barrier
and the sole descriptor publication. The mapped v3 checkpoint body is
extracted into publishCheckpointV3 (metadata and chunk barriers, owned-map
candidate outside every lock, the sole slot publisher under syncMu with the
recovery-lifetime check), which the flusher's checkpoint and the seed both
call. The v3 seed fsyncs the data, then raises W and CheckpointLSN to the
inherited frontier in that one publication, and moves the volatile
frontier only after it; a failure publishes nothing and a retry works. It
refuses local writes, an install, an attached chunk layer and a store
without an owned map, writing nothing.

The dark provider still refuses a HEAD restore onto a v3 store
(errV3RestoreNotYet in PrepareRestore, before any seed or claim) until the
v3 FreshFromHead restore on the owned map lands (codex03), so codex03's
TestDurableProviderV3_UnwiredHEADRestoreRefusesBeforeClaim stays as is.
WALStore.FormatV3 reports the dark format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:39:07 -08:00
pingqiu 99deddb4d6 fix(storage): refuse unwired v3 seed before legacy locking and serialization 2026-11-17 08:28:01 -08:00
pingqiu d9a3442693 test(durable): keep mapped failures closed and default provider legacy 2026-11-17 08:24:59 -08:00
pingqiu 71e70dabaf test(durable): exercise mapped v3 stores through actual provider 2026-11-17 08:23:39 -08:00
pingqiu cd03b059c8 fix: validate H2C data ranges without integer overflow 2026-11-17 01:58:25 -08:00