- Fork's early replay of a completed request refuses (volume_deleted)
a target whose HEAD is deleting, purging or deleted, also before its
VOLUME is marked, like the later publication path.
- Host.ImportLifecycleVolume registers a cluster-spec volume under the
CreateVolume RPC's boundary (workspaceMu, reservation check through
the create); blockmaster startup uses it, skipping (and logging) a
reserved id, and the placement import skips reserved ids too.
Unreserved ids keep importing idempotently.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codex01's r4 review (V:/share/rdma/codex01-block152-r4-review-
20261116T0445Z/REVIEW.md). Controls failing against stubs:
- Fork's early replay reports success for a target past the delete mark
(deleting, purging, HEAD deleted before VOLUME is marked)
(TestCatalog_ForkReplayRefusesADeletingTarget);
- the cluster-spec import re-creates and places a reserved id after a
restart with the original spec (TestClusterSpecImportSkipsAReserved
Volume).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
- 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>
Review of dfc8f19 (codex01, V:/share/rdma/codex01-block152-r2-review-
20261116T0342Z/REVIEW.md). Controls failing against stubs restoring the
reviewed behaviour:
- P1: an unknown id's admission and a known record's ordinary
DeleteVolume leave CreateVolume free, also after a restart
(TestMarkVolumeDeleting_ReservesUnknownIdsAndSurvivesDeleteAndRestart).
- P2 persistence: the mark is intent-only (no write/sync); write,
rename and directory-sync faults and a restart lose it
(TestDeletionReservations_*).
- P2 rollback: a give-back (claim, held HEAD) leaves the master
exclusion in place; a lost admission response reads as a refusal
(TestCatalog_DeleteVolumeGivesBackOnALiveClaim, ...HeldAfterAdmission
GivesBack, ...LostAdmissionResponse, TestOpsChunk_VolumeDelete with a
real master: claim refusal must leave the id usable).
- P2 failed abort: B's failed tombstone write still frees the name, so
A's late publication survives a completed delete
(TestCatalog_FailedAbortCannotHideALatePublication).
- P2 concurrent deletes: D1's revert after D2 committed counts as a
give-back (TestCatalog_ConcurrentDeleteCannotRollBackACommittedOne).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(a) Admission at the master: LifecycleService.MarkVolumeDeleting holds
workspaceMu (every assignment, placement and binding write) and marks
VolumeRecord.Deleting inside RecordWorkspaceDeletion's check (refused
with live authority without a clean revocation ACK, a pending move or
a queued placement). Afterwards publication admission, the placement
reconciler, the workload planner, binding/placement/move RPCs and
CreateVolume refuse the volume.
(b) One HEAD write from the HEAD read (active or detached, not held) to
state deleting, chunks kept. Every read decides "held" afresh.
ChunkRemote.CASHead refuses to move a deleting or deleted HEAD
(ErrChunkHeadPrecondition + ErrChunkHeadDeleted), so no attach,
claim or restore revives it; EnsureVolume refuses it; Fork and
CreateSnapshot check the volume again after taking their claim/name
and back out.
(c) Claims read after (b): a live claim reverts HEAD (detached or
active, as before) and refuses with snapshot_claimed.
(d) Then every snapshot name, published or not (an unpublished attempt
gets an aborted tombstone), goes through markDeleting and is freed;
the fork claim is released and reported only when confirmed.
(e) HEAD becomes deleted (no chunks), VOLUME is marked deleted.
A failed delete reports what it did (admitted, headMarked, reverted,
snapshots, aborted attempts, claimReleased, completed, uncertain); the
CLI prints that with the error and exits nonzero. The CLI's admission
is MarkVolumeDeleting (QueryVolumeStatus is no longer used).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 626c7de (codex01). One control per schedule, each failing
against a stub that restores the reviewed behaviour:
- P1 1: a holder that attaches before the HEAD mark's first read is
deleted (TestCatalog_DeleteVolumeRefusesAnAttachBeforeTheMark).
- P1 2: an attach that passed EnsureVolume revives a deleting/deleted
HEAD through CASHead (TestCatalog_DeletedHeadCannotBeRevivedByAClaim).
- P1 3: after the master's delete mark, an existing placement still
leads to an assignment, the reconciler places, the id can be created
and bound again (TestMarkVolumeDeleting_StopsLaterAssignment...).
- P2: a fork claim after the check is refused only after irreversible
writes (TestCatalog_DeleteVolumeGivesBackOnALiveClaim); a fork after
the mark installs (TestCatalog_ForkAfterTheDeleteMarkRefuses); a held
snapshot publication and a snapshot started after the mark escape the
delete (TestCatalog_DeleteVolumeCatchesInFlightSnapshots); a failed
claim removal is reported released, and the CLI drops partial effects
(TestCatalog_DeleteVolumeTombstonesAndReleases, TestOpsChunk_VolumeDelete).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Catalog.DeleteVolume refuses a volume in use (an active HEAD with a
holder, or the caller's InUseCheck: the CLI asks the blockmaster
whether it is assigned or served) with volume_in_use, and a volume
whose snapshot a live fork claims with snapshot_claimed, before any
write.
- Then: HEAD becomes a tombstone (state deleted, no chunks) by a
conditional write on the HEAD read, so an attach in between wins;
VOLUME is marked deleted; every snapshot goes through markDeleting
(the one mark path) and its name is freed; a fork's claim on its
parent is released. GC reclaims (the tombstone holds no roots; the
snapshots drop out after grace). A rerun finishes a partial delete.
- A deleted id is never reused: EnsureVolume (attach, create) refuses a
deleted VOLUME or HEAD with volume_deleted, and so does Fork for a
deleted target or source (the source checked after the claim).
- storage: HEAD state "deleted"; the HEAD decoder accepts it only with
no chunks, holder or detachedBy.
- CLI: sw-block ops chunk volume-delete <vol> --chunk-filer --master;
gc and volume-delete share masterEvidence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude05's item (2026-11-16 02:39Z): `sw-block ops chunk volume-delete`
plus Catalog.DeleteVolume. Controls, failing against a DeleteVolume
stub that deletes nothing:
- an attached volume (HEAD held) and one the blockmaster reports in use
are refused with volume_in_use, nothing written;
- a volume whose snapshot a live fork claims is refused with
snapshot_claimed, nothing written;
- fork w2 from s1, delete w2: HEAD tombstone (deleted, no chunks),
VOLUME deleted, snapshots freed; DeleteSnapshot s1 then succeeds; the
id is never attached, recreated or forked to again; an incomplete
fork's claim is released; a rerun replays;
- an attach between the check and the tombstone wins (held caller);
- the CLI needs a volume and --master and refuses an attached volume;
- real service + real GC: exactly the chunks only w2 and S1 reach are
reclaimed, w1's HEAD and S2 stay readable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>