IAC 2024 - IA Fast Track to Search Focused AI Solutions
Transaction Timestamping in Temporal Databases
1. German Shegalov Transaction Timestamping in Temporal Databases FR Informatik Graduiertenkolleg Ringvorlesung, May 26 th , 2003 based on the research by D. Lomet , C. Jensen and R. Snodgrass
2.
3.
4.
5.
6. Transaction Isolation x=0 r 1 (x=0) r 2 (x=0) w 2 (x=x+20) w 1 (x=x+10) x=30 x=10 Lost Update: w 1 (x=10) r 2 (x=10) abort 1 =w 1 -1 (x) w 2 (x=x+10) x=0 x=10 x=20 Dirty Read: x=0 y=0 x=0 y=10 Inconsistent Read: r 1 (x=0) w 2 (x=5) w 2 (y=10) r 1 (y=10) Read/Write, Write/Read, Write/Write are not commutable
7.
8.
9.
10.
11. Two Phase Commit (2PC) Coordinator DB 1 DB 2 force-log begin Timeline force-log prepared force-log prepared force-log commit force-log commit force-log commit force-log end prepare prepare yes yes commit commit ack ack
12.
13. 2PC for Transaction Time DB Coordinator DB 1 DB 2 force-log begin(10) Timeline force-log prepared;EARLIEST 1 ++ force-log prepared;EARLIEST 2 ++ force-log commit(11) force-log commit(11) force-log commit(11) force-log end /*begin_time = 10*/ /*EARLIEST 1 = 8*/ /*EARLIEST 2 = 10*/ prepare prepare yes(9) yes(11) commit(11) commit(11) ack ack