Capstone: old rollback must not erase new commits
T1 commits key=10
T2 writes 99, aborts back to 10
T3 commits key=30
crash
Required result: 30. Why does “undo every noncommitter” produce 10?
1 / 7
T1 commits key=10
T2 writes 99, aborts back to 10
T3 commits key=30
crash
Required result: 30. Why does “undo every noncommitter” produce 10?
Repeated crashes between operations are covered. Interrupted rollback is not.
A deleted slot can be reused:
live key 1 → tombstone key 1 → live key 2
Undo in reverse: restore tombstone key 1, then live key 1.
An insertion's previous slot is not always empty.
| LSN | Event |
|---|---|
| 3 | T2 update 10 → 99 |
| 4 | T2 abort requested |
| 5 | T2 compensation: after=10 |
| 6 | T2 rollback complete |
| 7 | T3 update 10 → 30 |
| 8 | T3 commit |
Compensation advances pageLSN. Completion prevents undoing T2 again.
An abort request alone is not a completed rollback.
Oracle: copy committed map at begin; edit working map; publish on commit; discard on abort/crash.
Test histories with:
The oracle need not know pages, LSNs, or CLRs.
Before adding concurrent transactions, add isolation. Before permitting crashes inside rollback, add resumable undo bookkeeping.
Explain why rebuilding a map index is valid, and why a B+Tree is an optional index replacement rather than part of this exercise's grading contract.