diff --git a/raft/log.go b/raft/log.go index 342d8f4ce..c4162d667 100644 --- a/raft/log.go +++ b/raft/log.go @@ -359,7 +359,7 @@ func (l *raftLog) mustCheckOutOfBounds(lo, hi uint64) error { } length := l.lastIndex() + 1 - fi - if lo < fi || hi > fi+length { + if hi > fi+length { l.logger.Panicf("slice[%d,%d) out of bound [%d,%d]", lo, hi, fi, l.lastIndex()) } return nil