etcd/raft/testdata
Tobias Schottdorf 0544f33248 raft: clarify ApplyConfChange contract for rejected conf changes
Apps typically maintain the raft configuration as part of the state
machine. As a result, they want to be able to reject configuration change
entries at apply time based on the state on which the entry is supposed
to be applied. When this happens, the app should not call
ApplyConfChange, but the comments did not make this clear.

As a result, it was tempting to pass an empty pb.ConfChange or it's V2
version instead of not calling ApplyConfChange.

However, an empty V1 or V2 proto aren't noops when the configuration is
joint: an empty V1 change is treated internally as a single
configuration change for NodeID zero and will cause a panic when applied
in a joint state. An empty V2 proto is treated as a signal to leave a
joint state, which means that the app's config and raft's would diverge.

The comments updated in this commit now ask users to not call
ApplyConfState when they reject a conf change. Apps that never use joint
consensus can keep their old behavior since the distinction only matters
when in a joint state, but we don't want to encourage that.
2020-02-25 12:45:45 +01:00
..
campaign.txt raft: add a batch of interaction-driven conf change tests 2019-08-16 09:38:44 +02:00
campaign_learner_must_vote.txt rafttest: print Ready before processing it 2019-08-16 09:41:35 +02:00
confchange_v1_add_single.txt rafttest: print Ready before processing it 2019-08-16 09:41:35 +02:00
confchange_v1_remove_leader.txt rafttest: print Ready before processing it 2019-08-16 09:41:35 +02:00
confchange_v2_add_double_auto.txt raft: clarify ApplyConfChange contract for rejected conf changes 2020-02-25 12:45:45 +01:00
confchange_v2_add_double_implicit.txt rafttest: print Ready before processing it 2019-08-16 09:41:35 +02:00
confchange_v2_add_single_auto.txt raft: remove bogus tail end of membership change interaction test 2020-02-25 12:35:51 +01:00
confchange_v2_add_single_explicit.txt rafttest: print Ready before processing it 2019-08-16 09:41:35 +02:00
snapshot_succeed_via_app_resp.txt raft: add a batch of interaction-driven conf change tests 2019-08-16 09:38:44 +02:00