mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-14 01:04:14 +00:00
lib/db: Don't panic on seq. coruption when debugging (#6662)
This commit is contained in:
parent
22c222bf75
commit
9a5f7fbadf
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user