[prev] 84 [next]

Transaction Processing

Distribution of data complicates tx processing ...
  • potential for multiple copies of data to become inconsistent
  • commit or abort must occur consistently on all nodes
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