mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
fcb5f608ac4c8d9430b9f42c54efb2bdf4f26a89
Every recovery zeroed the whole WAL range with pwrites and fsynced it: the WAL's size in writes on every open, twice on a new volume. On Linux, with the default sparse allocation, the fence now deallocates the range (a hole punch, which reads zeros) and then fsyncs; where the filesystem cannot punch, or off Linux, or on a prezeroed store, it writes zeros as before. A recovery skips the fence when the same range was fenced and fsynced in this open by the same writer with no WAL write since (a new volume's second recovery). The fence's bytes count only after its fsync: status reports FencePunched, FenceZeroed and FenceSkips. 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%