Distributed Databases (cont)
Distributed tx processing handled by two-phase commit
- initiating site has transaction coordinator Ci ...
- waits for all other sites executing tx
T to "complete"
- sends
<prepare T> message to all other sites
- waits for
<ready T> response from all other sites
- if not received (timeout), or
<abort T> received, flag abort
- if all other sites respond
<ready T> , flag commit
- write
<commit T> or <abort T> to log
- send
<commit T> or <abort T> to all other sites
- non-initiating sites write log entries before responding
|