]> git.giacomolli.uk - onechat/commitdiff
Write each line to the OS without an fsync
authorAnderson A. Giacomolli <redacted>
Fri, 6 Nov 2026 15:04:10 +0000 (12:04 -0300)
committerAnderson A. Giacomolli <redacted>
Fri, 6 Nov 2026 15:06:45 +0000 (12:06 -0300)
Each log line and each node goes to the operating system with one write
and no buffer before the call returns, so a crash of the process loses
nothing. view.json stays atomic through a temporary file and a rename.
An fsync on each write cost about 96 ms per message on a typical disk,
which made a long replay take hours. Durability against a power loss is
a later group commit, with one background sync that makes all earlier
writes durable.

Issue: beb9a70


No differences found