mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
9473fc5f3abc1d075a595be897c4d1353d54392d
A v3 checkpoint never exceeds W (DESIGN 2.2 item 5, 9.1 predicate 2: CheckpointLSN <= mapCoveredCheckpoint <= W). The flusher may flush dirty entries no Sync has acknowledged, so persistCheckpointV3 now clamps its candidate to the acknowledged W; the unsynced records stay retained in the WAL until a Sync covers them. (Raised by claude05's CkptUnsynced model note; Claude01 ruled the v3 rule is CheckpointLSN <= W.) The map candidate is prepared first, outside every lock, for the clamped checkpoint. The publication is a W publisher, so it runs under the v3 leader role (syncMu -> s.mu -> descMu), like Sync, refreshW and SetWMode, and cannot straddle a recovery; if a recovery lowered the acknowledged W below the prepared candidate meanwhile, the cycle publishes nothing. Control: an acknowledged LSN 1 and an unsynced dirty LSN 2 through a flusher cycle (stub map candidate) give checkpoint = covered = 1, the tail unchanged, and both LBAs readable after a crash. 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%