Tencent / phxpaxos

The Paxos library implemented in C++ that has been used in the WeChat production environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

为何Accept超时需要重新Prepare?

niukuo opened this issue · comments

看到代码里直接重新执行了Prepare,这里面是否有基于算法正确性的考虑?
如果判断wasRejectBySomeone==false时执行Accept是否会影响正确性?
希望不吝赐教,谢谢!

commented

重新 prepare 应该是最稳妥的做法。
只要过半数就可以 accept,这是算法自身保证的。