|
||||||
|
|
||||||
|
coord = Coordinator("tx-001") coord.add_participant(Participant("db1", prepare_fn, commit_fn, abort_fn)) coord.add_participant(Participant("mq1", prepare_fn_mq, commit_fn_mq, abort_fn_mq))
At its core, get2pc (often stylized as "Get 2 Phase Commit" or "Global Ensure Transaction 2 Phase Commit") is a . It ensures that all participants in a distributed transaction either all commit the change or all abort it.
coord = Coordinator("tx-001") coord.add_participant(Participant("db1", prepare_fn, commit_fn, abort_fn)) coord.add_participant(Participant("mq1", prepare_fn_mq, commit_fn_mq, abort_fn_mq))
At its core, get2pc (often stylized as "Get 2 Phase Commit" or "Global Ensure Transaction 2 Phase Commit") is a . It ensures that all participants in a distributed transaction either all commit the change or all abort it.