raft/log: remove redundant code logic (#12346)

Remove redundant code logic

Co-authored-by: yangweiwei <yangweiwei@cmss.chinamobile.com>
release-3.5
vivian 2020-09-30 10:48:32 +08:00 committed by GitHub
parent a6b0375b7b
commit ab4cc3caef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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