Explorar el Código

raft: improve panic error message

Give a human being some insight into how we might have gotten to this
state based on feedback from #3504.
Brandon Philips hace 10 años
padre
commit
68d4ec3e13
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      raft/log.go

+ 1 - 1
raft/log.go

@@ -181,7 +181,7 @@ func (l *raftLog) commitTo(tocommit uint64) {
 	// never decrease commit
 	if l.committed < tocommit {
 		if l.lastIndex() < tocommit {
-			l.logger.Panicf("tocommit(%d) is out of range [lastIndex(%d)]", tocommit, l.lastIndex())
+			l.logger.Panicf("tocommit(%d) is out of range [lastIndex(%d)]. Was the raft log corrupted, truncated, or lost?", tocommit, l.lastIndex())
 		}
 		l.committed = tocommit
 	}