Skip to content

CRITICAL: No fsync - WAL durability not guaranteed #147

@poyrazK

Description

@poyrazK

Why is this an issue?

In src/transaction/wal.cpp:71-76:

wal_file_.flush();  // Only std::flush, not fsync

Data may be in OS buffer on power failure. WAL entries can be lost.

What is causing it?

Missing fsync call.

How can it be solved?

Call fsync(fileno(wal_file_)) after flush.

Category

  • Small
  • Medium
  • Large
  • Critical

Severity

  • Low
  • Medium
  • High
  • Critical

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions