Commit Graph
646 Commits
Author SHA1 Message Date
pingqiu bf83322857 test: expect recorded revocation final while reservation is held 2026-11-29 16:43:57 -08:00
pingqiu 8897b14971 feat: stop restarted holders after recorded revocation 2026-11-29 15:51:36 -08:00
pingqiu 5fa69f529c fix: replay recorded revocation ACK before lease admission 2026-11-29 15:39:53 -08:00
pingqiu 2ca3c55641 test: guard forced-move loss evidence and typed preview refusal branches 2026-11-29 08:23:08 -08:00
pingqiu 88f2f95cde feat(cli): expose typed force-move admission as JSON 2026-11-29 08:23:08 -08:00
Ping Qiu 0d499a9859 Merge pull request #753 from seaweedfs/feat/attach-recovery-progress
feat(durable): the chunk attach reports its local work; 30 s bounds only its remote calls
2026-11-29 04:10:37 -08:00
Ping Qiu d212428e8b Merge pull request #755 from seaweedfs/test/binding-reconcile-interrupt
test(master): verify interrupted binding reconciliation converges
2026-11-29 03:58:10 -08:00
pingqiu 2776f8f1fc test(master): interrupt binding recovery at every retirement 2026-11-29 02:50:48 -08:00
pingqiuandClaude Opus 5.5 27be7892a8 fix(sw-block): restore --abort verifies its target; reruns converge after placement
- GetVolume reports a restore target's recorded restore tuple (source
  volume, snapshot, create request id): three additive read-only fields
  filled from the lifecycle record. --abort reads it before any change
  and refuses another restore's target, a plain volume, or a record with
  no tuple (a blockmaster before v1.0.1) with nothing changed.
- restore reads the placement (QueryWorkspace) before placing: once the
  authority line is published the master refuses any placement, so a
  line for this replica with this binding is this restore's placement,
  and a line for anything else refuses naming the abort.
- backup labels its snapshot with its request and accepts only an answer
  carrying that label (the holder answers an existing name with the
  snapshot already there); every printed fact must be present.
- Tests run the production volume-delete and release against the layout
  catalog: dependent removal, the tombstone refusal, interrupted aborts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 02:27:43 -08:00
pingqiu bcdc4ef4b3 Keep canceled recovery maps complete and observe remaining work 2026-11-29 01:26:33 -08:00
pingqiu 0c4fd5a65e Observe completed local recovery work with one inactivity clock 2026-11-29 01:09:10 -08:00
pingqiuandClaude Opus 5.5 58c5a47243 fix(sw-block): typed codes for a foreign-source restore and an unknown volume
The master's refusal of a restore whose snapshot names another volume's
chunks carries a typed reason (an ErrorInfo detail, RESTORE_SOURCE_NOT_OWN)
and the CLI maps it to its existing JSON code restore_source_not_own
instead of the generic not_admitted. A volume the master does not know
(NotFound from the resolve) exits with volume_not_found. A client decides
by these codes, never by message text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 00:55:36 -08:00
pingqiu a7bc8aa685 feat, status: bind counter windows to the live process identity 2026-11-28 21:49:22 -08:00
pingqiuandClaude Opus 5.5 de64d1a655 test(master): the restore-refusal catalog test's commit names its census row
Main now has a test (from the refused-restore change) that commits a HEAD
through layout.RunCommit; with the cause argument it passes
layout.CauseCommit. Test only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:31:52 -08:00
pingqiuandClaude Opus 5.5 4c34e33e88 feat(layout): every HEAD write names its census row (HeadWriteCause)
A HEAD is written by three store calls: the conditional update (only
through runTransition), the exclusive create, and the tombstone. Each now
takes a typed HeadWriteCause, one value per row of the HEAD writer
census, so a writer without a row does not compile. The transitions that
serve one row pass it; RunAbort, RunEndClean and RunCommit, which serve
several, take it from their caller. The layout store refuses a cause
outside the census, a first HEAD not written as create and a tombstone
not written as tombstone. No behaviour changes otherwise.

TestEveryHeadWriteIsACensusRow scans the production source: every HEAD
write names a census constant or forwards its function's cause, and
every row has a writer (both directions); it logs the writers by row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:21:19 -08:00
Ping Qiu dfb77aef28 Merge pull request #705 from seaweedfs/fix/cleaning-convergence
feat: resume holder cleaning and reclaim unused metadata
2026-11-28 19:56:05 -08:00
pingqiuandClaude Opus 5.5 400cf3edf7 fix(blockvolume): the template passes --volume-id=%i; guests are an observation, not complete detection
Review follow-up. The template unit takes the volume id from its
instance name, so a settings file cannot name another volume (a fourth
per-instance directive, kept by the drift test). /status/guests and its
schema say what it is: the counted frontends (NVMe/TCP, iSCSI) only; an
absent frontend is not served or not counted; a vanished host stays
counted until TCP closes; 0 is not proof that nothing uses the volume.
The endpoint test's callbacks use atomics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 19:25:31 -08:00
pingqiuandClaude Opus 5.5 a321c6bee4 feat(blockvolume): report connected guests; per-volume template unit
What volume start and volume stop need, before the commands.

/status/guests?volume=<v> reports the guests connected now through each
frontend served: NVMe/TCP hosts (live admin controllers) and iSCSI
initiators (Normal sessions past login; Discovery sessions do not count),
read at request time, and their sum.

deploy/systemd/sw-blockvolume@.service runs one volume per instance
from /etc/sw-block/volumes/<volume>.env with its own state directory;
apart from three per-instance directives it is sw-blockvolume.service,
and a test keeps the two the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 19:25:31 -08:00
Ping Qiu 86f0b373fd Merge pull request #682 from seaweedfs/feature/create-and-place
feat: create and place RF1 volumes through the running master
2026-11-28 19:24:50 -08:00
Ping Qiu a02bc5d2f5 Merge pull request #710 from seaweedfs/fix/refused-restore-no-record
fix(master): a refused restore leaves no target record; a deleted name is not told to retry
2026-11-28 18:45:43 -08:00
pingqiu 936f1018eb test: describe assignment admission without internal references 2026-11-28 18:30:07 -08:00
pingqiu 494a094c62 feat: resume holder cleaning and reclaim unused metadata
Remove unnamed roots, segments and chunks through one conditional mark/delete writer. Resume chunk cursors after bounded passes; re-plan metadata first and retain the session initial root set through operator snapshot deletes. Add a local trigger of the existing snapshot schedule for qualification.
2026-11-28 18:26:34 -08:00
Ping Qiu db136ca5e9 Merge pull request #715 from seaweedfs/fix/cluster-status-revision
fix: expose build revisions for cluster diagnostics
2026-11-28 18:20:58 -08:00
Ping Qiu a97259315d Merge pull request #722 from seaweedfs/test/golden-v100-master-stores
test: v1.0.1 reads the v1.0.0 files of the master's stores (golden guard)
2026-11-28 16:24:44 -08:00
pingqiu f02e4a0bfa include source modification in diagnostic revisions 2026-11-28 16:17:05 -08:00
pingqiu f91247f4cb expose comparable build revisions in diagnostic status 2026-11-28 16:17:05 -08:00
pingqiu 0d1d7974d9 test, master: pin assignment producer guard sites and retry ordering 2026-11-28 16:16:54 -08:00
pingqiu a09e94303d test, master: pin dynamic first-assignment refusal in the RF control 2026-11-28 16:16:53 -08:00
pingqiu b4a3f0f100 fix, master: require an assignment producer only for new intent 2026-11-28 16:16:53 -08:00
pingqiu e4f25b1674 test, master: cover recorded intent retries with the product loop disabled 2026-11-28 16:16:53 -08:00
pingqiu 0a996cacc2 test, master: configure assignment producers in lifecycle fixtures 2026-11-28 16:16:53 -08:00
pingqiu 0d90833404 fix, master: refuse dynamic creation without the lifecycle product loop 2026-11-28 16:16:53 -08:00
pingqiu e3d0e30f0a test, master: require an assignment producer at both creation doors 2026-11-28 16:16:53 -08:00
pingqiuandClaude Opus 5.5 1419a84630 docs(invariants): INV-CREATE-ONE-IDENTITY-001; a served-then-deleted name stays refused
The ledger row for the identity rule this change keeps: one name, one
layout identity; no directory but the record's holds a live HEAD. Its
scope: only a refused restore's record (never left the creation phase)
is removed; a served volume's deleted name is never created again. A
guard test proves that name is refused for a plain create, the same
restore request and a new one, with no record and no filer write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 16:15:54 -08:00
Ping Qiu 5ac89256ea Merge pull request #712 from seaweedfs/fix/peer-session-queue-order
fix, replication: give the peer queue ownership of session exchanges
2026-11-28 15:16:37 -08:00
pingqiuandClaude Opus 5.5 f62193d096 test: master-stores guard compares raw bytes, complete records and workspace decisions (workspace fixtures follow)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 13:19:37 -08:00
pingqiuandClaude Opus 5.5 9cf08758e1 test: v1.0.0 fixtures of the master's stores, generated on the tag
Generated on the v1.0.0 tag checkout (25a3b755), on Linux: the lifecycle
stores (volume records, placements, node inventory, deletion
reservations, bindings), the authority store (lines and lost ranges) and
the store attestations. Today's stores write the same files (volume
records compared with their store-minted layout ids blanked) and read
them as the same records; each file's blob hash is pinned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 13:10:35 -08:00
pingqiuandClaude Opus 5.5 f4c85aff14 test: golden guard for the master's v1.0.0 stores (fixtures follow)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 13:05:17 -08:00
pingqiu 51f5c6806d test, replication: reproduce concurrent heal and store attestation exchanges 2026-11-28 11:41:40 -08:00
Ping Qiu 11059ca0ae Merge pull request #707 from seaweedfs/fix/status-server-immediate-close
Fix status server panic during immediate shutdown
2026-11-28 11:40:52 -08:00
pingqiuandClaude Opus 5.5 c07097238b docs(master): an absent snapshot means no dependent is recorded now; removal is safe by the id-named directory
Comment only: a dependent may have been recorded and released by the
operator before the snapshot was deleted. No code change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 11:05:40 -08:00
pingqiuandClaude Opus 5.5 1ec0404d9d fix(master): a pending restore record is settled by a replay that finds its snapshot gone; a failed removal is a retry
Review follow-up. A restore can pass the master's snapshot check, write
its record, and then meet a snapshot deleted in between (refused for good
by target creation); a crash, or a removal that fails, leaves the record.
The replay then stops at the master's own snapshot check: it now removes
the matching not-ready record there, since a recorded dependent keeps
its snapshot, so an absent snapshot proves the target was never recorded
on the source. A removal that fails answers Unavailable (retry), not the
refusal.

Tests through the real catalog: a restore of a restore target's snapshot
is refused with no filer write and no record; a failure after the
dependent's write keeps the record and the replay completes it with the
same target id. Renewal on a not-ready name: admitted deletion untyped,
committed deletion typed DELETED.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 10:50:27 -08:00
pingqiuandClaude Opus 5.5 9f1c3d591f fix(master): a refused restore leaves no target record; a deleted name is not told to retry
CreateVolume of a restore target wrote its lifecycle record, then target
creation refused a snapshot naming another volume's chunks (a snapshot of
a restore target). The not-ready record stayed: the name resolved, the
documented delete found no HEAD, and workspace show advised a retry of a
CreateVolume that is refused for a deleted name.

When target creation refuses for good before any write (a foreign or
absent snapshot; no replay changes either), the master removes the
record in the same command. Any other error keeps it for the replay. The
workspace checks look at deletion before store readiness.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 10:27:34 -08:00
pingqiuandClaude Opus 5.5 16c8f86864 test: bound each NVMe command, and give the review helper a hang guard, not a 10 s budget
- The NVMe initiator renews its deadline (nvmeIODeadline, 60 s) before every
  I/O command, so it bounds each command instead of the connection's whole
  life: requireBlocks' 65,536 reads no longer race one dial-time deadline.
- reviewBindingHostBeforeStart's context is a hang guard for the whole test
  (60 s, was 10 s), so a slow host's setup does not use up the time the
  later calls and the successor probe need.

TestNVMeInitiatorDeadlineBoundsEachCommand and
TestWorkspaceRPCSameHostForcedRecoveryOutlivesASlowSetup pass; test-only,
no product change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 10:05:22 -08:00
pingqiuandClaude Opus 5.5 2095acfd7a test: red: a slow host's setup and a full-volume read outlast fixed test bounds
Two tests fail on a slow host while CI passes (a WSL run with its scratch
on a mounted Windows drive). Both fail because a fixed bound in the test,
not the product, runs out:

- TestWorkspaceRPCSameHostForcedRecoveryRecordsLoss: the successor probe and
  the later calls run under reviewBindingHostBeforeStart's 10 s context, and
  a slow setup uses it up ("signal: killed"). The new
  TestWorkspaceRPCSameHostForcedRecoveryOutlivesASlowSetup pauses 11 s
  before the probe (both clocks the test reads are fake, so no lease
  changes) and fails on main on any host.
- TestCutoverWriteSnapshotKillRestartRestore: the NVMe initiator sets one
  deadline at dial (60 s) and requireBlocks then reads all 65,536 blocks on
  that connection. The new TestNVMeInitiatorDeadlineBoundsEachCommand shortens
  the deadline (now the variable nvmeIODeadline) to 2 s, idles 2.5 s and
  reads one block: it fails on main on any host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 10:05:01 -08:00
pingqiu aee474665e fix status server immediate shutdown race 2026-11-28 08:41:33 -08:00
pingqiuandClaude Opus 5.5 57cfe0827f test: max volume size boundary at one block above, at both doors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 18:04:50 -08:00
pingqiuandClaude Opus 5.5 aa23975624 fix: refuse a new volume above the maximum size at both create doors
CreateVolume and the cluster-spec start check refuse a new volume above
geometry.MaxNewVolumeBytes with ErrVolumeTooLarge, naming the size and the
maximum, before any record or store exists. The check is at creation
only: a volume that already exists keeps opening under the uint32-LBA
limit. The value is a placeholder (MaxVolumeBytes) until it is set from
the measured capacity limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:58:23 -08:00
pingqiuandClaude Opus 5.5 2b55f61579 test(volume): the live re-draw through the real callbacks; R < H control; wider census
The lost-reply tests now run through the executor's registered callbacks:
a proxy forwards every frame to the replica (which admits and acts on it)
and discards its replies, so the fence and the catch-up really fail at
the sender; the failure is forwarded and the healthy verdict that
follows heals the peer, and live traffic is acknowledged. A behind peer
(R < H) is not healed by the healthy verdict, heals only through a
catch-up's registered close (every block equal to the primary's), and
then takes live traffic. The census now covers every reference to the
session order in the adapter's production source (constructor binding
and each draw by case), with helper, alias and outside-a-case controls.
Each control is red against its mutant: no afterFence wiring, no
afterSessionClose wiring, no re-draw on failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 21:45:27 -08:00
pingqiuandClaude Opus 5.5 de6a56b453 fix(volume): re-draw the live session above a session whatever its outcome
The replica takes a session's lineage when it admits it; the sender saw
only the exchange's result. A fence the replica admitted whose reply was
lost, or a recovery session whose close failed, left the replica above
the live session with no re-draw. The fence-complete and session-close
callbacks now re-draw the live session above the session on any outcome
(a completed recovery still advances the cursor and heals). A guard test
over the adapter's draw switch lists every command kind that draws a
session and what re-draws after it; the refresh's log line names the
session and the reason instead of 'after recovery='.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 21:29:44 -08:00