liveBook · Manning

Recovery

As explained in Think Distributed Systems

Recovery is a technique for restoring a system or transaction to an acceptable state after failure or interruption.

A recovery strategy restores a system or transaction from an illegal state to a legal, acceptable state after failure. It applies only where contingencies exist; intolerable states cannot be recovered from. section 3.1

A transaction recovery strategy typically:

  • Examines persistent records after restart to find transactions that were not committed. section 5.3.5
  • Applies Undo operations, which must be restartable and idempotent because crashes can interrupt or repeat them. section 5.3.5
  • Uses the recorded transaction state to choose abort, commit inquiry, REDO, or UNDO after a participant failure. section 6.3.2

A participant recovers

After a distributed transaction participant restarts, a pre-vote failure leads to persistent abort; a recorded vote-to-commit requires asking the coordinator; a recorded commit requires REDO; a recorded abort requires UNDO. section 6.3.2

Figure 3.1 System states and state transitions
A white rectangular object with black dots

AI-generated content may be incorrect.

Use the state-transition diagram to trace how failures move a system from an illegal state toward a legal state. section 3.1

How Think Distributed Systems covers it

How deep it goes
Explains restart logs, idempotent Undo, and state-dependent REDO or UNDO, while showing that coordinator failure can block progress.
Examples
Uses crash restart, Transaction Undo Logs, participant failures, coordinator failure, and state-specific recovery actions.
What it assumes
Assumes transaction logs and distributed transaction roles, while defining failure recovery and its limits from first principles.
What you can do after
Diagnose/debug with it by tracing persistent transaction state and selecting restartable Undo, REDO, abort, or coordinator inquiry.
How it connects
Connects failure recovery with failure tolerance, transactions, transaction logs, REDO, UNDO, and two-phase commit.

Also explained in

Compare how 3 books explain recovery →

Related concepts

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