raft: use IsEmptySnap to check the empty snapshot
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…
Reference in New Issue