CSE 444: Database Internals
Section 10:
Distributed processing and replication
Replication
Eager (Synchronous) �vs. Lazy (Asynchronous)
Write A
Write B
Commit
Write A
Write B
Commit
Write A
Write B
Commit
Write A
Write B
Commit
Write A
Write B
Commit
Write A
Write B
Commit
Master/Primary
Master/Primary
Secondary
Secondary
Secondary
Secondary
Master vs. Group
Propagation vs. Ownership
| Eager | Lazy |
Master | 1 transaction 1 object owner | N transactions 1 object owner |
Group | 1 transactions N object owners | N transactions N object owners |
Summary
A. Synchronous/Eager
B. Asynchronous/Lazy:
Ref.
Jim Gray, Pat Helland, Patrick O'Neil, and Dennis Shasha. The Dangers of Replication and a Solution. ACM SIGMOD Record (25)2, 1996
HW6, 2b
2PC Crash/Recovery Scenarios
Recovery Process
2PC Recovery Scenarios
2PC Recovery Scenarios
2. If the recovery process at a coordinator finds a transaction in the committing (resp. aborting) state
2PC Recovery Scenarios
3. If the coordinator process notices the failure of a subordinate while waiting for the latter to send its vote
4. If the failure occurs when the coordinator is waiting to get an ACK
2PC Recovery Scenarios
5. If a subordinate notices the failure of the coordinator before the former sent a YES VOTE and moved into the prepared state
6. If the failure (of the coordinator) occurs after the subordinate is in prepared state
2PC Recovery Scenarios
7. When a recovery process receives an inquiry message from a prepared subordinate site
2PC Recovery Scenarios
7 contd.
2PC Recovery Scenarios
7 contd.
2PC Recovery Scenarios
8. When the recovery process finds that it (the subordinate) is in the prepared state for a particular transaction