mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 02:57:37 +01:00
Restore is Fork recorded with Origin restore (same claim semantics: live until the target has a HEAD). Every reader of the fork record accepts OriginRestore; a replay onto a volume of the other origin is refused. MarkIndependent writes the write-once RESTORE-INDEPENDENT entry only when the resolved HEAD holds no ref to another volume (ForeignRefs: owner-qualified keys whose owner is not the volume). Tests: restore records origin/fork record and attaches; replay and origin mismatch; marker refused while foreign refs remain, write-once replay; source snapshot and source volume deleted mid-restore (attach, replay and finish stay normal); GC keeps every chunk the restored HEAD names with the snapshot and the source gone; a restore without a live HEAD never attaches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>