Tencent / phxpaxos

The Paxos library implemented in C++ that has been used in the WeChat production environment.
Other
3.36k stars 863 forks source link

accept成功后,learn节点的状态机Excute执行失败,状态机状态不一致的问题 #160

Closed wadeliuyi closed 5 years ago

wadeliuyi commented 5 years ago

场景简单抽象一下:A、B、C三个节点,A节点proposer,B、C是acceptor,一次paxos instance中accept成功,A learn成功,且状态机Excute成功,B也learn成功,状态机Excute成功,Clearn成功,但是由于某些原因状态机Excute的时候失败了,代码中好像没有处理这种异常的机制,麻烦帮忙解答一下,非常感谢^^

phinphing commented 5 years ago

这个可以execute里面判断下状态自行处理吧。

wadeliuyi commented 5 years ago

这个问题解决了,在Excute失败之后不会调用NewInstance接口,这样本节点的instance id就落后其他节点,下次再执行paxos算法的时候会重新调用Excute