Skip to main content
← CONCEPTS / DISTRIBUTED SYSTEMS & STORAGE
An end-to-end domain learning journey

Write-Ahead Logging (WAL)
& ARIES Recovery.

Write-Ahead Logging turns random dirty-page disk writes into sequential log appends, while ARIES (Analysis, Redo, Undo) reconstructs exact database state after a crash.
Start the journey7 sections· Last modified Nov 22, 2026
FIRST PRINCIPLES. PRODUCTION SCALE.
The idea to keep with you

When concurrent writes contend on shared state, never flush a modified data page to disk before its log record is fsynced (STEAL), and never force data pages on commit (NO-FORCE)—let ARIES Analysis, Redo, and Undo reconcile everything after a crash.

TL;DR30-second simplified summary
▾

Under a STEAL/NO-FORCE buffer pool, WAL guarantees durability and atomicity by enforcing flushedLSN >= pageLSN before page eviction and fsyncing commit records. ARIES coordinates the Dirty Page Table (recLSN), Transaction Table (lastLSN), and pageLSN headers across Analysis, Redo (repeating history from min recLSN), and Undo (backward prevLSN traversal with CLRs).

Before you begin · Building blocksAlready know these? Jump to Stage 01 ↓
ACID Transaction Fundamentals
ACID groups four guarantees for a database transaction: Atomicity (all-or-nothing), Consistency (enforced rules stay valid), Isolation (concurrent work does not expose partial state), and Durability (committed changes survive a crash under configured disk-flus...
B-Tree vs. LSM-Tree Storage Engines
B-Trees update fixed-size disk pages (4-16 KiB) in place for fast, predictable point and range reads, whereas LSM-Trees buffer writes sequentially in memory (MemTable + WAL) and merge immutable sorted runs (SSTables) in the background for orders-of-magnitude h...
Full walkthrough · 7 stages
01
L4 · FUNDAMENTALS

.

02
L4 · FUNDAMENTALS

.

03
L5 · APPLIED DESIGN

.

04
L5 · APPLIED DESIGN

.

05
L6 · SCALE & TRADE-OFFS

.

06
L6 · SCALE & TRADE-OFFS

.

07
L7 · STAFF / PRINCIPAL

.

Practice · Explain the consequences

Practice: Make the trade-off yourself.

Question 1 of 3
Score: 0/3

A buffer pool wants to evict a dirty 8 KB page with pageLSN = 4500 to disk while flushedLSN on the WAL is currently 4200. What must the storage engine do?

Recommended Learning Flow