-
Notifications
You must be signed in to change notification settings - Fork 10.3k
How about make configuration changes effective on received instead of applied #11284
Description
Hi, I'm currently writting some code to make configuration changes effective
on received instead of applied in raft-rs.
The main reason is to fix some potential bugs. For example,
The reason we do it is:
-
Suppose there is a Raft cluster with peers A, B, C and A is the leader.
So we can propose RemoveNode(C) and RemoveNode(B) one by oen on A,
and both of them can be committed by the Raft cluster, and committed by A.
However both B and C could have not applied 2 configuration changes,
so that they still think the cluster contains A, B and C. So B and C
may elect a new leader beside A, which means there are 2 leader in 1 term. -
Suppose there is a Raft cluster with peers A, B, C and D, and A is the leader.
So we an propose RemoveNode(D), then waiting for the proposal is committed (or applied)
to ACK the proposer. After the proposer is ACKed, he will think the cluster currently
only has 3 nodes, so the cluster should be available when A is isolated. However
B and C could still think the cluster contains A, B, C and D because the configuration
change has not been applied, in which case B and C can't elect a new leader forever.
And we are pleasure if we can port the behavior to etcd. Do you think it's necessary?