2PL Preserves Transaction Handshakes
Recall the definition: Ti commits before Tk starts
2PL serializes txns consistent with all transaction handshakes. I.e. there’s an equivalent serial execution that preserves the transaction order of transaction handshakes
This isn’t true for arbitrary SR executions. E.g.
- r1[x] w2[x] c2 r3[y] c3 w1[y] c1
- T2 commits before T3 starts, but the only equivalent serial execution is T3 T1 T2
- rl1[x] r1[x] wl1[y] ru1[x] wl2[x] w2[x] wu2[x] c2 (stuck, can’t set rl3[y]) r3[y] … so not 2PL