mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
125d895d2677e3fc16ef1d145ab04f1d46b00b85
The fault check under the store lock did not share a boundary with the latching: the flusher's extent fsync (and a WAL fsync) latch without the store lock, so a publication could pass the check, wait in its metadata barrier, and still publish after another path's fsync failed. Every fsync of the store's file (WAL batch, flusher extent, checkpoint, recovered bounds, direct frontier, frontier seed) now runs through syncFile under one leaf mutex, fileSyncMu: it is refused if a fault is latched, and a failure latches the fault before the mutex is released. Superblock publications run their pwrite and fsync together under it, so a refused publication does not even dirty the superblock; a pwrite failure still returns without latching. Nothing is acquired under fileSyncMu (callers may hold the store lock), so it adds no lock-order edge beyond store lock -> fileSyncMu. 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%