#cs454

Reading: 8.5

  1. Coordinator gets participants ready to commit their writes
  2. Everybody commits

Rules

  • Coordinator aborts a transaction iff at least one participants votes to abort it.
  • Coordinator commits a transaction iff all participants vote to commit it.

2PC State

  • L1: logs transaction id, list of participants, transaction metadata
  • L2: logs request and vote
  • L3: logs decision
  • L4: commit to disk
  • L5: cleanup

2PC Failures

  1. Abort
  2. Abort
  3. Abort
  4. Check vote in log
  5. Timeout retry
  6. Check log
  7. Block