Recoverability of Schedules

A recoverable schedule is one in which, whenever a transaction reads data written by another transaction, the writing transaction commits before the reading one does. This ensures an abort can always be handled safely, because a transaction never commits on data that is later rolled back; dependent uncommitted transactions are instead aborted through a cascading rollback.

3 min read

Recoverability is a property of a schedule that determines whether the database can always correctly handle a transaction aborting, even when other transactions have read data written by the one that's now being rolled back. A schedule that isn't recoverable can create a situation where undoing one transaction's changes is genuinely impossible to do correctly.

The core rule

A schedule is recoverable if, whenever a transaction T2 reads data written by another transaction T1, T1 commits before T2 does. If T2 could commit before T1, and T1 later aborts, T2's already-committed result depends on data that, as far as the database is concerned, never actually happened, and a commit can't be undone.

A worked example: an unrecoverable schedule

T1: W(A) = 50        -- writes A, not yet committed
T2: R(A)              -- reads T1's uncommitted write, A = 50
T2: COMMIT            -- T2 commits, based on that read
T1: ROLLBACK          -- T1 aborts, its write to A never should have existed

T2 already committed based on a value T1 wrote and then rolled back. Since commits are supposed to be permanent, there's no way to correctly undo T2's effect now, the database is left in a state that's genuinely impossible to reconcile.

The same scenario, made recoverable

T1: W(A) = 50
T2: R(A)              -- reads T1's uncommitted write
T1: COMMIT             -- T1 commits FIRST
T2: COMMIT             -- only now does T2 commit, after T1 is safely committed

By making sure T1 commits before T2 does, if T1 had aborted instead, T2 would still be uncommitted and could safely be aborted along with it (this is called a cascading rollback), rather than having already committed on data that turned out to be invalid.

Where this matters in real systems

Recoverability is a baseline correctness requirement, and it's exactly why the "dirty read" problem covered elsewhere matters so much: allowing a transaction to read another transaction's uncommitted data (a dirty read) is precisely what creates the risk of an unrecoverable schedule, unless the database is also careful to enforce commit ordering. This is one of the reasons even permissive isolation levels in real databases still enforce certain ordering guarantees around commits, recoverability isn't optional the way some isolation-level tradeoffs are, an unrecoverable schedule represents a genuine correctness failure, not just a performance tradeoff.

What interviewers actually ask about recoverability

  • "What does it mean for a schedule to be recoverable?" If a transaction reads data written by another transaction, the writing transaction must commit before the reading transaction does.
  • "What goes wrong in an unrecoverable schedule?" A transaction can commit based on data from another transaction that later aborts, leaving a committed result the database can't correctly undo.
  • "What's a cascading rollback?" When one transaction's abort forces other transactions that read its (uncommitted) data to also be rolled back, since their results depended on data that never should have existed.
  • "How is recoverability different from serializability?" Serializability is about producing a correct result under concurrency; recoverability is specifically about whether an abort can always be handled safely, they're related but distinct correctness properties.

Key takeaways

  • A schedule is recoverable only if a transaction that reads another's data commits after that other transaction has already committed.
  • An unrecoverable schedule can leave a committed transaction depending on data from a transaction that later aborted, an unfixable state.
  • A cascading rollback happens when one abort forces other transactions that read its data to also roll back.
  • Recoverability is a baseline correctness property, not an optional performance tradeoff like some isolation-level choices.
All 174 DBMS interview questions

Log in to save which topics you've read across every subject.

Frequently asked questions

What does it mean for a schedule to be recoverable?

If a transaction reads data written by another transaction, the writing transaction must commit before the reading transaction does.

What goes wrong in an unrecoverable schedule?

A transaction can commit based on data from another transaction that later aborts, leaving a committed result the database can't correctly undo.

What's a cascading rollback?

When one transaction's abort forces other transactions that read its (uncommitted) data to also be rolled back, since their results depended on data that never should have existed.

How is recoverability different from serializability?

Serializability is about producing a correct result under concurrency; recoverability is specifically about whether an abort can always be handled safely, they're related but distinct correctness properties.