7. Chapter 7: Transaction and Concurrency Control
7.4. Recoverability from aborts
Servers must record all the effects of committed transactions and none of the effect of aborted transactions.
The following present the problems associated with aborting transactions (in the context of the banking example).
Dirty reads
- Caused by the interaction between a read operation in one transaction and an earlier write operation in another transaction on the same object.
Recoverability of transactions
Cascading aborts
- In Figure 11, suppose that transaction U delays committing until after T aborts.
- U must abort as well.
- But, if any other transactions have seen the effects due to U, they too must be aborted.
- To avoid cascading aborts, transactions are only allowed to read objects that were written by committed transactions.
- Any read operation must be delayed until other transactions that applied a write operation to the same object have committed or aborted.
Premature writes
Strict executions of transactions
- The executions of transactions are called strict if the service delays both read and write operations on an object until all transactions that previously wrote that object have either committed or aborted.
- Enforces isolation property.
Tentative versions
- For a server of recoverable objects to participate in transactions, it must be designed so that any updates of objects can be removed when a transactions aborts.
- All of the update operations performed during a transaction are done in tentative versions of objects in volatile memory.
- Each transaction is provided with its own private set of tentative versions of any object that it has altered.
- The tentative versions are transferred to the objects only when a transaction commits, by which time they will also have been recorded in permanent storage.