Skip to content

dsorchard/two_pc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Two-Phase Commit

Part of Distributed Algorithms

Reference:

Notes

  1. Participants send heartbeats periodically. This could be done using hashicorp/memberlist (ie SWIM gossip protocol)
  2. If the coordinator detects the failure, then it can spin up a new Participant that can read from the durable log (assuming the log is persisted) to create a clone.
  3. When the old participant comes back online, the coordinator asks to recycle.
  4. For coordinator failure: 3PC, Paxos Commit.
  5. Distributed Dead Lock Detection: Periodically each of the Participants sends its wait-for graph to a designated deadlock master node. Then create a union and create a global wait-for graph to detect global deadlock.
  6. Also read about 2PL: Growing Phase, Shrinking Phase.link
  7. For locking, each participant has a lock table on their own node/machine. For Table level locks, you can have a central node, to track locks on the whole table/database. In MatrixOrigin, we add locks to mo_tables or mo_locks table.

Releases

No releases published

Packages

No packages published

Languages