liveBook · Manning

Transaction log

As explained in ScyllaDB in Action

A commit log is an append-only persistent record of database writes that supports recovery after a node failure.

A transaction log, called a commit log in ScyllaDB, is an append-only file that preserves writes before they reach durable SSTables. It protects data when a node or process fails: Scylla replays the log into the memtable during startup. section 6.2.2 section 8.3.1

A write follows this path:

  • Scylla writes the data to the in-memory memtable and appends it to the commit log. section 6.2.2
  • Appending avoids inserting into a particular disk location, reducing disk I/O while preserving durability. section 8.3.1
  • When the memtable and log reach configured limits, Scylla flushes data into a new immutable SSTable. section 8.3.1
  • After a process death, Scylla replays the commit log to reconstruct the memtable and prevent data loss. section 8.3.1

A restaurant review write

When a new restaurant review arrives, Scylla appends the write to the node’s commit-log file and places it in the memtable. If the process stops before an SSTable is created, startup replay restores the write. section 8.3.1

Figure 8.10 When data is written to the node, it first goes to the memtable and the commit log before eventually being flushed to disk into an SSTable.
figure

Trace data from the memtable and commit log to its eventual SSTable. section 8.3.1

How ScyllaDB in Action covers it

How deep it goes
Explains the write lifecycle, append behavior, configured flush thresholds, and startup replay, but defers deeper shard internals.
Examples
Uses a write-to-SSTable lifecycle and a failed-process recovery scenario to illustrate persistence.
What you can do after
Evaluate/understand how ScyllaDB preserves writes and reconstructs in-memory state after process failure.
How it connects
Connects the commit log with memtables, SSTables, write buffering, fault tolerance, and database recovery.

Also explained in

Compare how 6 books explain transaction log →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.