Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
raft: simplify auto-leave joint config of entry application logic
This commit simplifies the logic added in 37c7e4d to auto-leave joint configurations. It does so by making the following adjustments to the code: - remove the `oldApplied <= r.pendingConfIndex` condition. This does not seem necessary. When a node first attempts to auto-leave a joint config, it will bump `r.pendingConfIndex` when proposing. In cases where `oldApplied >= r.pendingConfIndex`, the proposal must have already been applied. Reviewers should double check this. - use raft.Step instead of custom proposal code. This code was already present in stepLeader, so there was no reason to duplicate it. This would have avoided bugs like the one we fixed in etcd-io#14538. - use `confChangeToMsg` to generate message, to centralize the creation of all `MsgProp{EntryConfChange}` messages.
- Loading branch information