Merge pull request #9669 from yaojingguo/fix-typo

contrib/raftexample: fix typo
This commit is contained in:
Xiang Li 2018-05-01 10:18:42 -07:00 committed by GitHub
commit a6430644ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,7 @@ func (rc *raftNode) entriesToApply(ents []raftpb.Entry) (nents []raftpb.Entry) {
} }
firstIdx := ents[0].Index firstIdx := ents[0].Index
if firstIdx > rc.appliedIndex+1 { if firstIdx > rc.appliedIndex+1 {
log.Fatalf("first index of committed entry[%d] should <= progress.appliedIndex[%d] 1", firstIdx, rc.appliedIndex) log.Fatalf("first index of committed entry[%d] should <= progress.appliedIndex[%d]+1", firstIdx, rc.appliedIndex)
} }
if rc.appliedIndex-firstIdx+1 < uint64(len(ents)) { if rc.appliedIndex-firstIdx+1 < uint64(len(ents)) {
nents = ents[rc.appliedIndex-firstIdx+1:] nents = ents[rc.appliedIndex-firstIdx+1:]