Browse Source

raftexample: Fix publish snapshot error message

The error message is different to the condition it checks for. This PR
modifies the error message accordingly.

Closes #9717.

Signed-off-by: Kostas Christidis <kostas@christidis.io>
Kostas Christidis 7 years ago
parent
commit
9431532730
1 changed files with 1 additions and 1 deletions
  1. 1 1
      contrib/raftexample/raft.go

+ 1 - 1
contrib/raftexample/raft.go

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