{"id":"wal-rotate-fsync-before-close","text":"`_rotate` always fsyncs the outgoing segment before closing it, ensuring no buffered writes are lost during segment rotation.","truth_value":"IN","source":"entries/2026/05/29/write-ahead-log-wal-_rotate.md","source_url":"","source_hash":"","justifications":[],"dependents":["wal-multi-segment-continuity-is-reliable"],"metadata":{"example":"def _rotate(self):\n    if self._fd:\n        self._fd.flush()\n        os.fsync(self._fd.fileno())\n        self._fd.close()"},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"wal-rotate-fsync-before-close","truth_value":"IN","reason":"premise"}]}}