-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raft arbiter support #321
base: master
Are you sure you want to change the base?
raft arbiter support #321
Conversation
Signed-off-by: Li Wang <laurence.liwang@gmail.com>
这个机制看着和 witness 是一回事情,实现得有一些问题:
MongoDB 实现的不是标准 Raft,有一些设计不能原样照搬 |
The current implementation seems to be the simplest way with minimum modification to braft to support two data copies, and it covers most situations. The only situation is when leader down, and the length of candidate's log is shorter than that of arbiter. In this case, the cluster will not have a leader elected. However, such situation (leader down and candidate lost data simultaneously) should rarely happen. In this case, the cluster manager needs to choose between consistency and availability. If consistency is preferred, the cluster needs to wait for original leader to restart. If availability, the manager could enable candidate elected by removing arbiter from the cluster, which can be automatically done by a script. |
@PFZheng witness特性有合入计划吗 |
这个有进展么 |
This commit implements raft arbiter. An arbiter does not have a copy of data and only participates in elections. The concept is similar to MongoDB arbiter (https://docs.mongodb.com/manual/core/replica-set-arbiter). The motivation behind is for some cost-sensitive circumstances, three copies are not affordable, but an odd number of votes are needed to break a tie