...

/

3-Phase Commit (3PC)

3-Phase Commit (3PC)

In this lesson, we will look into how the 3-phase commit protocol solves the problem of the 2-phase commit protocol.

The problem with 2-phase commit protocol

As we described previously, the main bottleneck of the 2-phase commit protocol was failures of the coordinator leading the system to a blocked state.

Ideally, we would like the participants to be able to take the lead in some way and continue the execution of the protocol in this case, but this is not so easy.

The underlying reason is the fact that in the commit phase, the participants are not aware of the state of the other participants—only the coordinator is So, taking the lead without waiting for the coordinator can result in breaking the atomicity property.

For instance, imagine ...