batch-mode-defers-fsync

Status: IN

In `batch` sync mode, individual WAL appends do not fsync until `_write_count` reaches `_batch_sync_count` (default 100), leaving up to 99 records vulnerable to crash loss

Source: entries/2026/05/29/topic-fsync-semantics-by-mode.md

Example

elif self._sync_mode == "batch":
    self._write_count += 1
    if self._write_count >= self._batch_sync_count:
        self._fd.flush()
        os.fsync(self._fd.fileno())
        self._write_count = 0

JSON