mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: check VotersOutgoing
for snapshot
Close #12631. Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
This commit is contained in:
parent
f85b08c735
commit
f947c815d0
@ -1412,6 +1412,9 @@ func (r *raft) restore(s pb.Snapshot) bool {
|
||||
for _, set := range [][]uint64{
|
||||
cs.Voters,
|
||||
cs.Learners,
|
||||
cs.VotersOutgoing,
|
||||
// `LearnersNext` doesn't need to be checked. According to the rules, if a peer in
|
||||
// `LearnersNext`, it has to be in `VotersOutgoing`.
|
||||
} {
|
||||
for _, id := range set {
|
||||
if id == r.id {
|
||||
|
Loading…
x
Reference in New Issue
Block a user