mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: use IsEmptySnap to check the empty snapshot
This commit is contained in:
parent
e466126510
commit
8ee1bf31d6
@ -231,7 +231,7 @@ func (r *raft) sendAppend(to uint64) {
|
||||
if err != nil {
|
||||
panic(err) // TODO(bdarnell)
|
||||
}
|
||||
if snapshot.Metadata.Term == 0 {
|
||||
if IsEmptySnap(snapshot) {
|
||||
panic("need non-empty snapshot")
|
||||
}
|
||||
m.Snapshot = snapshot
|
||||
|
Loading…
x
Reference in New Issue
Block a user