mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
acc1258015fcf86ef552cc317d8e3233b5107366
A fork or restore no longer claims its parent snapshot, and neither DeleteSnapshot nor retention reads a claim: a deadline-exceeded fork or a failed restore can no longer make its parent (and so its volume) undeletable. Safety now rests on time: a fork takes its deadline start before it reads the parent, every attempt (a retry included) reads it again, and it publishes its HEAD only before start + operation deadline; GC keeps a deleted attempt rooted for its grace, and NewCollector now requires grace >= operation deadline + clock skew + CAS apply bound (new GCConfig field, default: the operation deadline). An unknown publish keeps the fork intent, which roots the keys until the target is resolved. Removed: claimForkParent/dropForkClaim/removeForkClaim (replaced by readForkParent), the claim branch of markDeleting, liveClaims, claimedErr and snapshot_claimed, retention's ForkHeld outcome and the fork_parent keep (forkParentsNeeded). A claims xattr written by an older version is ignored. Tests: three new tests (fork retry after delete re-reads the parent; delete during a fork in flight; unknown publish keeps the keys while its intent exists), each red on the base with snapshot_claimed; the construction check with its boundary; claim-mechanics tests removed, the others rewritten to the new rule. Docs: invariants.md M6 rows, INV-SNAP-DELETE-ANY-ORDER-001 (new), INV-SNAP-EXPLICIT-DELETE-001 and INV-GC-GRACE-DEADLINE-001 restated, INV-RESTORE-PARENT-HOLD-001 archived; workspace design section 6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Languages
Go
84.6%
Rust
7.8%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%