fix(reaper): 回收前先停服并持有世界维护锁再归档,锁丢失不删卷;无世界卷的无主服务器只重置时钟不再重复回收

This commit is contained in:
Lemon-miaow committed 2026-09-25 03:31:50 +08:00
1 parent 89a0134707
commit 7766e8efa4
14 files changed
+751 -51

No files matched your search

+6 -1
View File
@@ -18,7 +18,8 @@
// conflict and re-checks.
//
// A lock older than Grace with no Job behind it is stale (felis-api died between
// the two writes) and holds nothing.
// the two writes) and holds nothing. The reaper is the one holder without a Job:
// it keeps its lock fresh by rewriting it while it archives and reclaims a world.
//
// A restore that starts with a safety snapshot is two Jobs in a row: the backup
// Job carries the restore to run after it (LabelThenRestore), and felis-api
@@ -83,6 +84,10 @@ const (
KindRestore = "restore"
KindBackup = "backup"
KindFileWrite = "file-write"
// KindReap is the reaper archiving an idle world and reclaiming its volume.
// It runs no Job: the reaper holds the Annotation itself and rewrites it
// well inside Grace for as long as it works on the world.
KindReap = "reap"
)
// FilesModeWrite is the LabelFilesMode value of a file write.