lib/db: Don't panic on seq. coruption when debugging (#6662)

This commit is contained in:
Simon Frei 2020-05-18 10:42:51 +02:00 committed by Jakob Borg
parent 22c222bf75
commit 9a5f7fbadf

View File

@ -233,8 +233,7 @@ func (t *readOnlyTransaction) withHaveSequence(folder []byte, startSeq int64, fn
if shouldDebug() { if shouldDebug() {
if seq := t.keyer.SequenceFromSequenceKey(dbi.Key()); f.Sequence != seq { if seq := t.keyer.SequenceFromSequenceKey(dbi.Key()); f.Sequence != seq {
l.Warnf("Sequence index corruption (folder %v, file %v): sequence %d != expected %d", string(folder), f.Name, f.Sequence, seq) l.Debugf("Sequence index corruption (folder %v, file %v): sequence %d != expected %d", string(folder), f.Name, f.Sequence, seq)
panic("sequence index corruption")
} }
} }
if !fn(f) { if !fn(f) {