Merge pull request #9718 from kchristidis/fix-snap-pub-error

raftexample: Fix publish snapshot error message
This commit is contained in:
Wenjia 2018-10-11 16:45:55 -07:00 committed by GitHub
commit 1cab49ef78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -336,7 +336,7 @@ func (rc *raftNode) publishSnapshot(snapshotToSave raftpb.Snapshot) {
defer log.Printf("finished publishing snapshot at index %d", rc.snapshotIndex)
if snapshotToSave.Metadata.Index <= rc.appliedIndex {
log.Fatalf("snapshot index [%d] should > progress.appliedIndex [%d] + 1", snapshotToSave.Metadata.Index, rc.appliedIndex)
log.Fatalf("snapshot index [%d] should > progress.appliedIndex [%d]", snapshotToSave.Metadata.Index, rc.appliedIndex)
}
rc.commitC <- nil // trigger kvstore to load snapshot