Every service said ready. Then the coordinator died.
transcript
Three services all said ready to commit. Then the coordinator died. Now they wait, holding their locks.
Two-phase commit, the textbook answer. Phase one: the coordinator says prepare. Each service gets ready, and answers ready. From now on, it holds its locks. Phase two: if everyone's ready, commit. Otherwise, abort. Works on paper.
Everyone answers ready. Then the coordinator crashes, before sending commit. Can a service commit on its own? Abort on its own? Neither is safe. It can't know what was decided for the others. So it waits. Maybe forever. Its locks stay held. Other transactions pile up. Throughput collapses.
So 2PC is blocking. Locks from prepare until the decision. Every service must be up at the same time. One slow one slows everything. And most things don't support it. Third-party APIs don't. You can't tell Stripe to prepare a charge.
Two-phase commit says: lock everything, do everything, unlock everything. A saga flips it. Each step commits locally, in its own service. No shared locks. A step fails? Run compensations for the earlier steps. A refund undoes a charge.
Across services, a lock that waits on someone else can wait forever. So don't lock across services. Do each step, and know how to undo it.
Full breakdown in the lecture.