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 GitHub
parent 668979605b
commit 5b34c31cb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -272,8 +272,7 @@ func (t *readOnlyTransaction) withHaveSequence(folder []byte, startSeq int64, fn
if shouldDebug() {
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)
panic("sequence index corruption")
l.Debugf("Sequence index corruption (folder %v, file %v): sequence %d != expected %d", string(folder), f.Name, f.Sequence, seq)
}
}
if !fn(f) {