Skip to content

v1.0 – Write-Ahead Logging & Crash Recovery

Choose a tag to compare

@Subham1100 Subham1100 released this 03 Jan 00:24
· 49 commits to main since this release

v1.0 – Write-Ahead Logging

This release introduces persistence and crash recovery
using a write-ahead log (WAL).

Features

  • Durable writes via fsync
  • Crash recovery by WAL replay
  • Single-node, single-threaded design

Known limitations

  • No snapshots
  • No WAL truncation
  • No concurrency

Guarantees (v1)

  • A write is considered committed only after WAL fsync
  • Crashes after fsync do not lose data
  • Crashes before fsync may lose recent writes
  • Recovery deterministically rebuilds state by replaying WAL

Observations:
WAL replay amplification: On every restart, WAL grows with the same PUTs again. That is expected and cannot be eliminated safely.

  1. WAL grows forever

  2. Startup time grows forever

  3. Disk usage grows forever

Non-Goals (v1)

  • No concurrency
  • No snapshots
  • No WAL truncation
  • No performance optimizations

These are intentionally deferred to later versions.