Files
seaweedfs/seaweed-block/cmd/blockmaster
pingqiu-cpu c50b3d190f fix(master): retire spec-removed volume metadata after deletion (#1019)
Merge note (batch b9; pull_request_target spec-trace workflow has a startup_failure, so its checks run locally):
- One Test run (47234365908) succeeded (go test (linux), process-level tests (real binaries)) on the integration tree b9d12608 = main d2f0fa54 + #1019 #1020 #1024  in this order; these squash merges reproduce that tree, verified after the last one.
- spec-trace-check.sh and public-text-check.sh, run with main's scripts against this head and body: both exit 0.
- Code review ACCEPT on 2b7bae7a: at a cluster-spec start, a placement whose volume left the spec and seed and holds no work is pruned; a deleted volume's authority record and placement are retired only after a committed deletion reservation, no live workspace lease and a fresh HEAD read showing the volume deleted or absent, and its tombstone is kept forever; cluster checks never probe deleting or deleted volumes.
- Model check PASS against the delete-retirement model (two volumes, master restart, late writer; all configurations pass). Linux: the fresh-host half-retirement witness and the focused tests pass under the race detector.
- Code read ACCEPT confirmed on d231931b after the repo-wide Linux run (go test -short ./... exit 0, 52 packages ok).
2026-12-03 16:36:25 -08:00
..

Cluster imports and desired volumes

With --lifecycle-store, authority publication requires a lifecycle VolumeRecord. A placement intent or a remote chunk catalog VOLUME alone is not that record.

--cluster-spec registers each volume with positive size_bytes and its replication_factor before importing placement and starting publication. The registration is durable and idempotent. A different size/RF from an existing record refuses startup; existing protocol/transport and Kubernetes metadata are preserved. Volume registration records desired state, not authority or an epoch.

For a legacy cluster spec without size_bytes, call the LifecycleService CreateVolume RPC (the CSI create path also does this) before expecting the imported placement to publish. --lifecycle-placement-seed is placement-only: it has no capacity field, so the same CreateVolume prerequisite applies. The master refuses missing records with the volume ID and this instruction; it does not infer capacity or bypass the publication guard.

Legacy --topology without a lifecycle store keeps its existing behaviour.