mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
An apply admitted under recovery A's mark could land after recovery B took the mark and completed: its entry lay under B's valid table, labelled B's epoch. Every recovery-data apply (both lanes, dual lane through the gate) now runs under the table's apply fence, shared, and only while its token owns the mark; Invalidate, CompleteRecovery and Replace take the fence exclusive, so a change of owner waits for in-flight applies to settle and the old owner's later applies are refused. A catch-up may complete only if the table was valid when it took the mark (one persisted bit); after any overlap only a rebuild makes it valid. A catch-up states the LSN it starts after, and the replica takes the mark only if its durable end matches. A live entry of a new epoch is accepted only at the store's next LSN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>