mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
3e76473c073b239afabb77eceb21b30525541d80
codex01 row 5c review (87a922fa, AMEND). Lock graph first, unchanged:
syncMu (v3 leader) -> s.mu -> descMu -> fileSyncMu; Recover holds
s.mu -> descMu -> fileSyncMu and never takes syncMu. No edge is added.
- P1: a flusher refresh could read Wack 2 and pause while a same-open
Recover dropped record 2 and reset Wack to 1; the resumed refresh then
published W 2 and the next Recover reported a false wal_corrupt. Every
recovery now bumps a recovery epoch first thing (under s.mu, before it
reads the descriptor). Every publication of a W derived from cached
wack/appended values (Sync batch, refreshW, SetWMode) captures the epoch
with them and rechecks it inside its publication mutate, under descMu: a
superseded publication is dropped (errV3RecoveredMeanwhile; the refresh
treats it as nothing to do). A publication that wins the race completes
before the recovery reads the descriptor, so its W is genuine.
Held real-flusher control: the refresh caches W 2 and parks, the same
instance recovers to R 1, the refresh resumes and publishes nothing, and
the next Recover succeeds.
- P2: held tests register the store crash with t.Cleanup before the
release cleanup, so a failure releases the hold before shutdown.
- P2: the empty-dirty-set refresh branch has its own control.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Languages
Go
84.5%
Rust
7.9%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%