Commit Graph
74 Commits
Author SHA1 Message Date
759b7f3a36 seaweed-block: test the import syncfs selector and report each store's import mode (on #13458) (#13469)
* seaweed-block: preserve unchanged imports and batch durable publication

* seaweed-block: name the rejected entry in a startup import error

The batch import returned the bare validation error, so a bad cluster-spec
node or placement seed stopped startup without saying which entry. The
per-entry RegisterNode/ApplyPlan loop named it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: name the import path in the freshness row and registry guard

Startup now replays nodes through ImportNodes, not RegisterNode; list it
where the freshness invariant and the registry-writer guard name the
writers. Drop a doubled blank line in the operations manual.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: poison a lifecycle store only on a persistence error

A node registration whose SeenAt cannot be encoded failed before any file
I/O, but RegisterNode latched the marshal error and every later mutation
returned ErrLifecycleRecoveryRequired until reopen. Latch only a
RecordPersistenceError, as the volume store already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: keep a node's SeenAt when its declaration changes

registrationLocked kept SeenAt only for an unchanged declaration. A
restart that changed a node's declared pools or address stamped the
current time, so a silent node passed the stale-observation check. A
declaration without an observation time now keeps the stored one; a new
node still gets the current time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: use the import syncfs only on filesystems that report its errors

The batch path was chosen from the kernel release alone. On overlayfs,
syncfs checks the overlay superblock's writeback errors, not the upper
file's, and on FUSE it does not send FSYNC to the daemon, so an import
could publish records whose data never became durable. Select syncfs
only when the records directory is on ext4, xfs, btrfs or tmpfs, and keep
per-file fsync elsewhere. The startup line now reports the path for the
lifecycle store, after it exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: assert the imported values before the reopen check

The import step control compared the store's snapshot with a reopen, so
an import that synced and renamed but committed the old values passed.
Check the changed and unchanged values before and after reopen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: check both views after a removal retry

present() returned record && snapshot, so a removal that cleared only one
view passed the final check. Report both and require both absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: assert the one-second fail-stop bound

The blocked-logger control checked only exit status 1 inside a four-second
child timeout, so a longer exit timer still passed. The child now reports
when it triggers the failure, and the parent requires exit within the
one-second deadline plus one second of scheduler tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: add the lifecycle machine's transition table

Every other Part A machine lists its transitions with guard, enforcing
code and Part B rows; the lifecycle record I/O machine had only its
diagram. Also name DeletePlacement and DeleteVolume beside RemoveNode in
the open gap: none of them syncs the directory after removing a record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: scope the manual's lifecycle exit policy to the stores it covers

Only the node, placement and volume stores have the fail-stop handler.
State that deletion-reservation and workspace-binding write failures
return the error without exiting, and that an uncertain binding store
needs a restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: test the import's syncfs selection through the production selector

TestSyncfsFilesystemGate checked the filesystem predicate directly and
the selector only with an unreadable directory, so a selector that took
syncfs after any successful Statfs passed. A test hook now rewrites the
filesystem type a successful Statfs reports; an import into a readable
directory reported as overlay must sync each file, and its ext4 twin
must issue one syncfs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: report import durability for the node and placement store directories

Startup probed the lifecycle root, but the node and placement imports
select syncfs from their own nodes/ and placements/ directories, so a
subdirectory on a separate mount could report one path and use the
other. Each store now reports the mode its import selects, startup
prints both, and nothing is printed without a lifecycle store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: list the syncfs selector and per-store mode tests in the ledger

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: pingqiu <pingqiu@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 12:25:46 -08:00
de239e7404 seaweed-block: preserve unchanged master imports and batch durability (#13458)
* seaweed-block: preserve unchanged imports and batch durable publication

* seaweed-block: name the rejected entry in a startup import error

The batch import returned the bare validation error, so a bad cluster-spec
node or placement seed stopped startup without saying which entry. The
per-entry RegisterNode/ApplyPlan loop named it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: name the import path in the freshness row and registry guard

Startup now replays nodes through ImportNodes, not RegisterNode; list it
where the freshness invariant and the registry-writer guard name the
writers. Drop a doubled blank line in the operations manual.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: poison a lifecycle store only on a persistence error

A node registration whose SeenAt cannot be encoded failed before any file
I/O, but RegisterNode latched the marshal error and every later mutation
returned ErrLifecycleRecoveryRequired until reopen. Latch only a
RecordPersistenceError, as the volume store already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: keep a node's SeenAt when its declaration changes

registrationLocked kept SeenAt only for an unchanged declaration. A
restart that changed a node's declared pools or address stamped the
current time, so a silent node passed the stale-observation check. A
declaration without an observation time now keeps the stored one; a new
node still gets the current time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: use the import syncfs only on filesystems that report its errors

The batch path was chosen from the kernel release alone. On overlayfs,
syncfs checks the overlay superblock's writeback errors, not the upper
file's, and on FUSE it does not send FSYNC to the daemon, so an import
could publish records whose data never became durable. Select syncfs
only when the records directory is on ext4, xfs, btrfs or tmpfs, and keep
per-file fsync elsewhere. The startup line now reports the path for the
lifecycle store, after it exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: assert the imported values before the reopen check

The import step control compared the store's snapshot with a reopen, so
an import that synced and renamed but committed the old values passed.
Check the changed and unchanged values before and after reopen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: check both views after a removal retry

present() returned record && snapshot, so a removal that cleared only one
view passed the final check. Report both and require both absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: assert the one-second fail-stop bound

The blocked-logger control checked only exit status 1 inside a four-second
child timeout, so a longer exit timer still passed. The child now reports
when it triggers the failure, and the parent requires exit within the
one-second deadline plus one second of scheduler tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: add the lifecycle machine's transition table

Every other Part A machine lists its transitions with guard, enforcing
code and Part B rows; the lifecycle record I/O machine had only its
diagram. Also name DeletePlacement and DeleteVolume beside RemoveNode in
the open gap: none of them syncs the directory after removing a record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: scope the manual's lifecycle exit policy to the stores it covers

Only the node, placement and volume stores have the fail-stop handler.
State that deletion-reservation and workspace-binding write failures
return the error without exiting, and that an uncertain binding store
needs a restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: pingqiu <pingqiu@users.noreply.github.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 11:28:54 -08:00
Ping QiuandClaude Opus 5.5 a5686e7fa7 Sync seaweed-block v1.1.1 into seaweed-block/ (#13411)
Brings seaweed-block main (v1.1.1 plus the docs and a test fix after it)
into seaweed-block/ as one commit. Only files under seaweed-block/ change,
and the subtree equals seaweed-block main exactly. The module's full
history stays in the seaweed-block repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 19:04:53 -08:00
pingqiuandClaude Opus 5.5 a13f2d6fdf sw-block, master: a failed --json answer fails the command; a retire's storage failure is Internal
Review fixes. When the --json answer cannot be written, retire-host and
finalize-format exit 1 instead of 0. A retire whose record removal failed
answers Internal (the CLI's failed, exit 1), not FailedPrecondition (refused,
exit 2); the node store's test hook can fail a removal for the control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:31:45 -08:00
pingqiuandClaude Opus 5.5 02ccbd700d master: bindings and admitted reservations count as existing state; the retry test starts its host
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 02:40:44 -08:00
pingqiu 5c5c57055d fix: settle pending identity before create metadata enrichment 2026-11-30 23:15:44 -08:00
pingqiu ffe16608dd fix: redraw pending volume identity after directory collision 2026-11-30 23:06:30 -08:00
pingqiu e5aeb426d7 blockvolume: classify parser sites and refuse unresolved mount roots 2026-11-30 22:37:34 -08:00
pingqiu 96229aec75 test: classify isolated startup probe identity mint 2026-11-29 19:28:23 -08:00
pingqiuandClaude Opus 5.5 68b6100328 test: the layout identity census lists the restore command's readers
volumeRestore and volumeRestoreAbort read layout ids; each now has its
probe: a restore answer without a valid layout id is unknown and places
nothing, and abort refuses settings naming another layout id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 03:04:44 -08:00
pingqiuandClaude Opus 5.5 92404c5236 test(lifecycle): register volume start's layout identity sites with their probes
miniVolumeSpec, volumeSpec's args and env, and volumeStart read or write
the layout id; each is listed with the test that probes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 19:25:54 -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
pingqiu 2cb10e1f7f test: register create-and-place layout identity probe 2026-11-28 16:17:25 -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 b3e4677d4d test(lifecycle): the golden placement is an existing replica's slot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 13:09:12 -08:00
pingqiuandClaude Opus 5.5 0e73c80a79 test(lifecycle): the golden placement uses a valid source
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 13:08:38 -08:00
pingqiuandClaude Opus 5.5 4c2dd3e1f7 test(lifecycle): the golden generator lets the store mint layout ids; volume records are compared with them blanked
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 13:07:57 -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
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 ab747bfa47 change: cut over to the content-named store and delete the legacy store
The runtime stores each volume in one content-named layout on the filer:
immutable chunks, segments and roots are ordinary filer files, and one
HEAD entry per volume carries every conditional commit. A holder claims
HEAD under its granted epoch and claim id, cuts in its own session,
commits by HEAD generation and position, and is fenced when its identity
moves. Catalog, restore, snapshot, retention, cleaning, verify and volume
delete run through the layout kernel; the master mints the layout
identity, reads HEAD proofs and holds the delete reservation and lease
barrier. The legacy store, its intents and its compatibility paths are
removed; existing stores are recreated, not converted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:59:23 -08:00
pingqiuandClaude Opus 5.5 4d9f242640 feat: typed kind on lease renewal refusals
RenewWorkspaceLease refusals carry a WorkspaceLeaseRefusal status detail
(code and text unchanged): BARRIER with the time left until the
forced-move barrier passes, MOVED only when the published line names
another replica or a newer epoch owned by another known server, DELETED
only for a committed deletion. Everything else carries none (OTHER).
The barrier comes from a typed error, never from the text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:59:55 -08:00
pingqiu 3c50b14e8d refactor: share lifecycle record durability and warn on ancestor sync failures 2026-11-22 11:29:31 -08:00
pingqiu 8f98eb3caa test: keep lifecycle opens available under ancestor sync failures 2026-11-22 11:27:48 -08:00
pingqiu f9038ca88d fix: sync the full lifecycle ancestor chain on every open 2026-11-22 10:51:03 -08:00
pingqiu b87fea473b test: reproduce incomplete ancestor sync after failed first open 2026-11-22 10:50:31 -08:00
pingqiu aaedc61855 fix: sync every created lifecycle ancestor from cleaned paths 2026-11-22 10:44:01 -08:00
pingqiu f865a8e21f test: expose unsynced lifecycle ancestors and trailing separator 2026-11-22 10:43:23 -08:00
pingqiu d0626bdfcd fix: sync lifecycle parent entries and pin sync failure publication 2026-11-22 10:35:08 -08:00
pingqiu 33097cb797 fix: durably replace volume and placement lifecycle records 2026-11-22 10:31:31 -08:00
pingqiu 16ea488a0b test: reproduce volume and placement record loss across rename 2026-11-22 10:30:55 -08:00
pingqiu 5ea7c6a006 docs: bind node inventory crash safety to durability invariant 2026-11-22 10:26:32 -08:00
pingqiu ba6574c87b fix: atomically sync node inventory replacements 2026-11-22 10:21:57 -08:00
pingqiu 34f5c7656c test: reproduce node inventory loss at publication rename 2026-11-22 10:21:33 -08:00
pingqiuandClaude Opus 5.5 8d103b2c85 fix: iSCSI CSI paths bind IQN and LUN; live-renewal held-registration control; lease diagram guard
codex01 review of #416 3439d278 (INV-AUTH-HOLDER-IDENTITY-001, INV-WS-RENEW-NONBLOCKING-001):
- P1: primaryOwnedFrontends keys an iSCSI target by IQN AND LUN, so a supporting q/LUN2 never
  becomes a multipath path of the primary's q/LUN1 (mismatch and nonzero-match controls).
- P2: TestLiveRenewalDoesNotWaitForAHeldRegistrationWrite renews through holderMatches over
  gRPC while a registration write is held (NodeInventoryStore.HoldWritesForTest), and shows
  the hold is real.
- Standards: the workspace lease diagram's holder edges name the registered-host guard; the
  snapshot test's control reader has a bounded, owned join.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:44:21 -08:00
pingqiuandClaude Opus 5.5 abc57ceb61 fix: registry read from a committed snapshot; CSI publishes only a primary-owned target; deletion keeps the stream check
codex01 review of #416 e56f1de1 (INV-AUTH-HOLDER-IDENTITY-001, INV-WS-RENEW-NONBLOCKING-001):
- P1-1: the holder host check reads NodeInventoryStore.GetNodeSnapshot (published after each
  committed write), never the store mutex RegisterNode holds across file I/O.
  Held-registration-write control in core/lifecycle.
- P1-2: a primary slot with no frontend lists nothing; status frontends carry their replica
  (FrontendTarget.replica_id = 8); CSI publishes a target only when the primary has a usable
  frontend, another replica's frontend joining only as an extra path to the same target.
  Real CSI lookup negatives (no primary frontend; rejected loopback primary).
- P2: a deletion-reserved workspace volume keeps the assignment stream host check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:44:21 -08:00
pingqiu 6154b7299e test: cover failed placement commits and trace holder guards 2026-11-22 01:56:11 -08:00
pingqiu 476b5fceb9 fix: keep holder membership lookup off placement writer locks 2026-11-22 01:21:01 -08:00
pingqiuandClaude Opus 5.5 ec40814443 master: validate a move target's endpoints; log a refusal outside the lock
Fold of the #260 review:
- the target endpoints get the binding endpoint rules before admission
  (host:port, numeric port 1..65535, data and ctrl distinct), without
  registering anything: a host match alone admitted ':0', ':65536', a
  non-numeric or empty port, or identical data and ctrl, and the move
  would have issued and cleared the source lease;
- host parts compare in canonical form (equivalent IP spellings);
- the refusal log runs after workspaceMu is released;
- the comment no longer calls the host match a proof; the invariants
  ledger gets the move-admission row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 05:34:16 -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
pingqiu 7a1f9826fc chore: preserve original UTF-8 text and group shared geometry imports 2026-11-18 21:13:30 -08:00
pingqiu f67517f2e4 fix: refuse volume creation above the uint32 LBA capacity limit 2026-11-18 21:09:12 -08:00
pingqiu 75725d6b32 test: require volume capacity refusal at create boundaries 2026-11-18 21:04:21 -08:00
pingqiuandClaude Opus 5.5 31b911dac7 test(workspace): safety controls for the lease horizon (#205)
GREEN-gating controls for the memory-only renewal:
- grants clamp to the durable horizon under a permanently stalled
  store, renewals without host validity or at the horizon are refused,
  and a real guard fences by horizon - skew/2;
- a restart honours the persisted horizon in the forced barrier;
- an extension whose rename landed but whose directory sync failed
  latches uncertainty, refuses the next renewal, and reloads with the
  landed horizon barring a forced move until horizon + skew;
- an extender held inside its write orders a same-volume revocation or
  forced move after it;
- same-volume renewals during held revocation and forced-move writes;
- the lease view equals derive(published) after every writer kind;
- N volumes renew concurrently with apply, revocation, ACK, a clean
  move, extenders and Close (run with -race);
- Close joins a held extender, and an extender admitted before closing
  writes nothing;
- lifecycle snapshots follow every records change, stay immutable, are
  read without the store mutex, and keep a protective unknown outcome;
- through the services layer, query and revoke replies report the
  grant, and a renewal during a held same-volume reservation returns
  the revoking lease.

The r1-r3 slow-store wrappers count the delayed writes and require at
least one, so a green cannot bypass the injected stall. Tests that own
a Publisher directly join its extenders before their store closes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:58:54 -08:00
pingqiuandClaude Opus 5.5 a4fd1303ef fix(workspace): answer lease renewals from memory under a durable horizon (#205)
A renewal of a live workspace lease persisted the new expiry with a
temp-file fsync under the publisher's global lock, and the renewal RPC
also read two lifecycle stores whose mutexes writers hold across file
I/O. A slow or busy master disk therefore made the host's 2 s renewal
RPC time out, the guard fence and the volume shut down.

Renewal now takes only a small leaf lock (leaseMu) over a per-volume
lease view and does no I/O:
- grant = min(now+TTL, durable horizon), where the horizon is the
  published Lease.ExpiresAtNS; the deadline is raised to the grant.
- It refuses stale, pending-move, expired, uncertain or storeless
  state as before (never bypasses INV-AUTH-UNCERTAIN-001), and refuses
  with an error when the grant would leave no positive host validity.
- The first grant of a lease still writes synchronously under p.mu and
  persists horizon = now + 1.5*TTL.
- A per-volume single-flight extender is an ordinary p.mu writer: it
  writes horizon = trigger + 1.5*TTL through persistWorkspaceLocked, so
  its write and publication are one p.mu section; any write error
  latches uncertainty as before.

Writers keep persist-before-publish and refresh the view (p.mu ->
leaseMu, the only new lock edge) at every derive-input change.
Revocation and query replies report the granted expiry, never the
horizon. Host.Close joins extenders before the store closes.

The renewal RPC reads lock-free immutable snapshots of the Volumes and
deletion-reservation stores, republished at every records change
(including load, delete and the protective unknown outcome).

Behaviour change: a forced move now waits for the durable horizon plus
skew, at most TTL/2 later than before. Existing tests that read the
persisted lease as the grant, or waited only grant + skew, are updated
with that reason. The store-write boundary guard now skips _test.go
files: a test double that delays and delegates Put is not a production
write caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:58:54 -08:00
pingqiuandClaude Opus 5.5 1193cb751b test(workspace): reservation persist hook and RED for renewal behind a held lifecycle write (#205)
Add DeletionReservationStore.SetPersistHookForTest, an instance-local
test seam that installs the existing write-fault hook under the store
mutex (nil by default).

r5: while the deletion-reservation write of an unrelated volume is held
in that hook, a renewal through the services layer must return within
2 s. On main it waits on the reservation store's mutex.

r4 and r5 now release held writes first and settle every worker with
bounded waits before clearing hooks or closing fixtures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 04:42:15 -08:00
pingqiuandClaude Opus 5.5 9f82dcd48a volume delete: no snapshot cascade; incarnation-bound commit
claude05's cut (04:08Z): volume-delete refuses with
volume_has_snapshots while the volume has any snapshot name record (a
published snapshot, one being deleted, or an attempt in flight); the
operator deletes snapshots first. The delete never touches snapshot
names, attempts or roots: the snapshot loop, the claim check and claim
release (a claim lives on a named snapshot; a deleted target's claim is
dead by rule), and CreateSnapshot's back-out are gone. CreateSnapshot
and Fork still refuse once they see the delete mark.

codex01's r3 P2s:
- the snapshot check, the revert and the commit are bound to one
  deleting incarnation (its generation); if HEAD moved, the check runs
  again on the incarnation found;
- the CLI's admission token is --request-id (required), so a rerun
  adopts and can give back an earlier invocation's hold;
- CreateVolume holds workspaceMu through the create;
- the reservation store syncs its parent directory before use (the
  binding store's helper).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:27:44 -08:00
pingqiuandClaude Opus 5.5 425161bbe3 volume delete: RED controls for the cut and the r3 P2s
claude05's 04:08Z cut (no snapshot cascade) and codex01's r3 P2s
(V:/share/rdma/codex01-block152-r3-review-20261116T0405Z/REVIEW.md).
Controls failing against stubs:

- the cut: a volume with a snapshot, an in-flight snapshot attempt, or
  a fork's snapshot is deleted (TestCatalog_DeleteVolumeRefusesWhile
  SnapshotsExist, TestCatalog_InFlightSnapshotRefusesTheDelete, ...Fork
  DuringTheDeleteMarkRefuses, ...TombstonesAndRefusesReuse);
- incarnation: a claim check under generation G commits a re-marked G'
  (TestCatalog_DeleteCommitIsBoundToItsIncarnation);
- lost CLI token: a rerun cannot release the earlier hold
  (TestOpsChunk_VolumeDelete, real master, restart);
- CreateVolume drops workspaceMu before the create
  (TestMarkVolumeDeleting_CreateHoldsTheReservationLock);
- the reservation directory's parent is not synced
  (TestDeletionReservations_ParentSyncBeforeUse).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:27:44 -08:00
pingqiuandClaude Opus 5.5 2e078746ee volume delete: durable master reservation, commit point, settled abort
- Master: a deletion reservation store (core/lifecycle), separate from
  the desired-volume records, so an unknown id is reserved too and the
  ordinary DeleteVolume/CreateVolume path cannot clear it. Held by
  per-delete tokens (admitted), permanent once committed. Writes reuse
  the binding store's crash-safe pattern (synced temp file, atomic
  rename, synced directory); an unknown outcome keeps a protective
  change in memory (fail closed). MarkVolumeDeleting records it under
  RecordWorkspaceDeletion's check; new AbortVolumeDeleting and
  CommitVolumeDeleting. Every gate (publication admission, reconciler,
  workload planner, binding/placement/move, CreateVolume) consults it.
  VolumeRecord.Deleting is gone.
- Catalog: Admission is Admit/Commit/Abort; ErrNotAdmitted marks a
  definite refusal, anything else is an unknown outcome
  (admissionUncertain). Every give-back aborts this delete's admission.
  A commit point (HEAD deleting -> purging, conditioned on the HEAD
  read) precedes the irreversible steps; a revert races on the same
  write, so a delete that sampled a claim cannot undo another delete's
  commit, and reports an error instead of a give-back.
- CreateSnapshot's back-out settles its name like the delete does: the
  name is freed only after the attempt's tombstone or winning
  publication is confirmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:54:32 -08:00