Understanding of the paxos protocol

Accept with a smaller serial number and promise with a larger serial number can be executed at the same time, but if the promise succeeds first, the accept must fail. The reason lies in the super-half mechanism. This point is to prove the core of the poxas protocol.

Proof of the paxos protocol

An excellent article,
but I think his understanding of convergence is wrong. The consensus of the poxas protocol means that the majority of nodes in the cluster accept the same votes, but only the majority of stored values ​​are not acceptable. These values ​​are also It may be covered by higher votes and the final consensus is not this value. Therefore, the non-increasing number of different values ​​in the cluster cannot represent its convergence.

From a higher level, the majority promise and the majority accept are pre-locking and locking in disguise. For pre-locking, it can be scrambled by higher votes. The precondition for locking is to get the pre-locking first. The end is to complete the first lock.

From this point of view, the poxas protocol may cause livelock due to contention between repeated pre-locking and real locking. You can compare multiple threads to the same mutex by pre-locking and then locking, resulting in livelock.

Guess you like

Origin blog.csdn.net/qq_41634872/article/details/109962964