mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
98d7fd8181e6967b4afb700a397db6d57d4da84b
The WAL and the extent share one file, and on Linux a failed fsync may already have dropped dirty pages of that file, so a later successful fsync proves nothing about them (the fsyncgate pattern). The first failure of any fsync on the file (WAL batch, flusher extent, checkpoint, recovered bounds, direct frontier, frontier seed) now latches ErrFsyncFailed, wrapped in a SubstrateIO RecoveryFailure (io_error). Until the store is reopened: Sync refuses without another fsync, writes, batch writes, ApplyEntry and WriteExtentDirect refuse, the flusher advances no checkpoint, Recover and the frontier seed refuse, and Close writes no final superblock. A reopen recovers from what is on disk. Tests that asserted a same-instance retry after an injected fsync failure now assert the sticky refusal and a reopen: the generation sync tests, the checkpoint and direct-frontier metadata tests, the frontier seed test, the recovered-bounds test and the two restore seed tests (whose real EINVAL fsync now requires a reopen before the restore succeeds). 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%