etcdserver: fix snapshot panic message

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee 2018-04-20 11:20:17 -07:00
parent 01fc2901b6
commit f205b22434

View File

@ -1069,12 +1069,11 @@ func (s *EtcdServer) applySnapshot(ep *etcdProgress, apply *apply) {
if apply.snapshot.Metadata.Index <= ep.appliedi {
if lg != nil {
// expect apply.snapshot.Metadata.Index > ep.appliedi + 1
lg.Panic(
"unexpected snapshot from future index",
"unexpected leader snapshot from outdated index",
zap.Uint64("current-snapshot-index", ep.snapi),
zap.Uint64("current-applied-index", ep.appliedi),
zap.Uint64("incoming-snapshot-index", apply.snapshot.Metadata.Index),
zap.Uint64("incoming-leader-snapshot-index", apply.snapshot.Metadata.Index),
)
} else {
plog.Panicf("snapshot index [%d] should > appliedi[%d] + 1",