The write-ahead log
Checkpoint rarely and a crash takes hours to replay. Checkpoint often and the steady state gets more expensive - in two places, and one of them is the log itself. Where do you put the dial?
Every change goes into a log first and reaches the pages themselves only later. Thirty writes run past a checkpoint and into a power cut, and one panel keeps a running count of what recovery would have to re-apply. Shorten the gap between checkpoints and watch that count fall while the log itself grows.
On a narrow screen the three panels stack below the dial and tabs, and the table scrolls sideways.
try this Drag How long the log may run between checkpoints to its shortest, press Add next write repeatedly, and watch If the power died now.
Included with a plan
This lab is included with a plan. The first three lessons of every track are free, with their boards and videos. A plan unlocks every lesson, board, video, lab and paper for one price.
see also In Search of an Understandable Consensus Algorithm, The Google File System, Bigtable: A Distributed Storage System for Structured Data, Kafka: a Distributed Messaging System for Log Processing, The Log-Structured Merge-Tree (LSM-Tree), ARIES: A Transaction Recovery Method Supporting Fine-Granularity Locking and Partial Rollbacks Using Write-Ahead Logging and Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing in Papers.