Question for RAFT joint consensus

131 views
Skip to first unread message

yuhang xiu

unread,
Mar 15, 2023, 11:24:27 PM3/15/23
to raft-dev

Sorry to bother. Could someone pls help me to point out my problem?


I have two questions:


1. In the joint consensus, is the Cold,new configuration the union of the old nodes and the new nodes? At this time, when the node configured by Cold,new is received, when the leader is down, will it vote for all old nodes and new nodes?


2. In a specific scene. Suppose our old nodes is configured as A(leader), B, C, and the new nodes is configured as A, B, D. First step, A send Cold,new ( {A,B,C}U{A,B,D} ) to D and C. Since {A,C} is majority of Cold and {A,D} is majority of Cnew, this log will be commmit. Then A send Cnew to D and C. (We assume that B is completely disconnected from this membership change and has not received any messages.) Since {A, C} is majority of Cold and {A, D} is mojority of Cnew, this Cnew will be commit, too. 

After that, C quit from new member and disconnected. And then A is disconnected. In this time, cluster only left B(with Cold config) and D(with Cnew config). 

In this case, B does not know D (B still use {A,B,C}), so he will not vote for D. D can only get its own vote and cannot become the majority in Cnew. At the same time, B can only get his own votes, and cannot become a majority in Cold. So, although Cnew has been committed, and B and D are the majority of Cnew, a leader cannot be generated.


Jordan Halterman

unread,
Mar 17, 2023, 1:01:56 AM3/17/23
to raft...@googlegroups.com
Your understanding of the approach is correct, but I’m not so sure about the second scenario. Yes, B does not know B, but B doesn’t have to know D to vote for D. The RequestVote protocol does not involve checking whether the candidate is present in the voter’s log. Only the term and log are compared, and in this scenario, only A and D will have the committed configuration change entry, so only A and D can win an election. If B and D both are trying to get elected, D will always win.
--
You received this message because you are subscribed to the Google Groups "raft-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to raft-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/raft-dev/6575e85c-c2be-4e14-8286-16073a5e7e6en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages