You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/05/31 03:37:02 UTC

[GitHub] [rocketmq] imaffe edited a comment on issue #2056: Issues and Improvement Strategies in the Raft Protocol Election

imaffe edited a comment on issue #2056:
URL: https://github.com/apache/rocketmq/issues/2056#issuecomment-636415449


   > raft协议在网络抖动,机器临时故障等极小概率情况下会产生以下选举问题:
   
   > 情况2:结点【5,6,7】等少数结点接受结点7该term=7的选举,结点7未作为leader执行职责,但此时因为【5,6,7】结点已经认可了term=7的任期,
   
   > 会导致结点1以term=6所发送提议无法被接受,但结点1因为已经此实确实获取多数结点认可,在提议被多数接受后会进行提交。可惜目前所用的raft协议未考虑该情况下的处理方案。
   
   节点1 在发现 5,6,7 认可了term = 7 的时候,会立刻退化成为follower 状态。如果出现了这种情况说明节点1 不应该继续成为leader了。任何leader在察觉到有比自己高的term的时候就意味着有新的leader要被选取出来了。
   
   > 但结点1因为已经此实确实获取多数结点认可,在提议被多数接受后会进行提交
   
   这个多数投票只是让节点1成为了leader,entry X 的commit动作只会发生在 超过半数的node 都写入了entry X 之后才会commit。
   
   感觉情况2就是正常的raft处理leader change的情况,可能我理解有偏差,还望指正。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org