mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 11:07:31 +01:00
626c7de1a250e1615bd0d689b4c596131a719b72
- 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>
Languages
Go
84.8%
Rust
7.6%
Shell
2.7%
templ
1.5%
Java
0.9%
Other
2.3%