Write-ahead log for OLTP
Your task
Design the write-ahead log for a single-node relational OLTP engine that must guarantee durability (committed transactions survive a crash) and atomicity (no torn writes), while sustaining 60k small transactions/sec with a commit-latency p99 under 5ms. The dataset is 500GB on NVMe; in-place page updates are used for the main heap/index. Describe the WAL record format, the commit protocol, how recovery works, and the main throughput trade-off.
It covers
- Group commit
- Fsync
- Checkpointing