Example: Transaction Abort

Setup
This example describes actions that the Write Ahead Log in the normal execution of an abort (where no crash has occurred). We will be using only components described in the WAL Logging Framework.

Assumptions

 * strict two phase locking concurrency control
 * STEAL, NO-FORCE buffer management with WAL
 * Disk writes are atomic
 * Transactions are a series of reads and writes, followed by a commit or abort

Components
The components we are using are described by something I call the logging framework and is shown to the right.

Process

 * 1) Write out an abort log record before starting
 * 2) Find the lastLSN of the current transaction and follow the chain backwards using the prevLSN
 * 3) For each update encountered
 * 4) ​Create a Compensation Log Record (CLR)
 * 5) Undo the update using the before image
 * 6) At the end, write an end log record