Definitioncore
Recoverable schedule
Also called recoverability.
A schedule in which each transaction commits only after every transaction whose writes it read has committed.
A schedule is recoverable (RC) if no transaction commits before every transaction it read from has committed. It is the weakest of the three recovery classes of Hadzilacos (1988), with cascadeless and strict schedules inside it. Recoverability is about aborts, not about interleaving: serializability looks only at the committed projection, so a serializable schedule can still let a committed transaction keep a value that an abort later erases. A recoverable schedule never needs to undo a commit, which the D of the ACID properties forbids.
Definition
Let be a schedule, and use the reads-from relation of the schedule page: reads from () if , has not aborted before , and every write of between them belongs to a transaction that aborted before .
Definition (Hadzilacos 1988). is recoverable if for all :
RC denotes the class of recoverable schedules.
Why the condition is the right one. Assume that is recoverable and that the active transaction aborts now, so the schedule becomes . Every transaction that read from has seen a value that no longer exists, so it must abort too, and so must every transaction that read from one of those, and so on. Claim: in a recoverable , none of these transactions is committed. Proof. Let be a chain in which each reads from . We show by induction on that is not committed. For , is active. If is not committed and were committed, the definition would need , a contradiction.
So in a recoverable schedule every abort can be completed by aborting active transactions only. In a schedule that is not recoverable, some abort would require undoing a commit.
Basic facts.
- Prefix closed. If is recoverable, so is every prefix . The reads-from pairs of are those of whose read lies in , since they depend only on the actions before the read. If , then , so is also in .
- A scheduler enforces RC by delaying commits. Every schedule without commits is recoverable. A scheduler can let read uncommitted data, and then hold back until all the transactions that read from have committed. If one of them aborts, it aborts instead.
- Inclusions. ST ACA RC, and both inclusions are strict. The proof of the inclusions is on the serializability page; the examples below show that they are strict.
- Independent of serializability. RC and the class of schedules whose committed projection is conflict serializable are incomparable. Every serial schedule is in both.
Examples and non-examples
The table gives one schedule for each region of the diagram of the classes RC, ACA (avoids cascading aborts) and ST (strict), crossed with conflict serializability (CSR) of the committed projection. Each row is in the classes marked "yes" and in no other class of the table.
| schedule | RC | ACA | ST | CSR |
|---|---|---|---|---|
| no | no | no | yes | |
| no | no | no | no | |
| yes | no | no | yes | |
| yes | no | no | no | |
| yes | yes | no | yes | |
| yes | yes | no | no | |
| yes | yes | yes | yes | |
| yes | yes | yes | no |
The dirty read that commits. In the first row, reads from and commits first. If now aborts, the database must erase the value of , but is committed and may have shown that value to a user. The schedule is conflict equivalent to the serial schedule , so serializability alone does not catch this.
Recoverable but with a cascade. In the third row, waits with its commit until has committed. Had aborted instead of committing, would have had to abort too. That is allowed in RC; the cascadeless class forbids it.
Recoverable but not serializable. In the fourth row, reads after and reads before . The conflict graph has the cycle , but the commit order is correct for the only reads-from pair.
Reads-from across an abort. is not recoverable: reads from , because comes after the read, and commits although never does. The variant is recoverable: after the abort, reads from , which commits before .
Not a property of the committed projection. The committed projection of is , which is recoverable. The schedule itself is not. Recoverability must be checked on the full schedule, with its aborts.
Related definitions
- Cascadeless schedules (ACA) ask more: a transaction reads only committed data. Then an abort never forces another abort.
- Strict schedules (ST) ask more again: no item is read or overwritten while its last writer is still active. Then the abort of a transaction is undone by writing back the before images of its writes. Strict two-phase locking produces strict schedules.
- Two-phase locking in its basic form gives conflict serializable schedules that need not be recoverable: a transaction may release an exclusive lock after its lock point and before its commit, and another transaction may read the item and commit first.
- Commitment ordering is a different condition on commit order: it orders the commits of conflicting transactions in the order of their conflicts. It is about serializability, not about aborts.
- Crash recovery handles the aborts of all transactions that were active at a crash. Recoverability of the schedule is what makes that possible without touching committed work.
References
- Vassos Hadzilacos, A theory of reliability in database systems, Journal of the ACM 35(1), 1988, pages 121 to 145, the recoverable, cascadeless and strict classes of histories and their inclusions
- Philip A. Bernstein, Vassos Hadzilacos and Nathan Goodman, Concurrency Control and Recovery in Database Systems, Addison-Wesley, 1987, Chapter 1 (recoverability, cascading aborts, strict executions) and Chapter 2 (recoverable histories)
- Gerhard Weikum and Gottfried Vossen, Transactional Information Systems, Morgan Kaufmann, 2001, the chapter on transaction recovery (the classes RC, ACA, ST and rigorousness)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag G0MPST Edit this page History Report an error Markdown