chore(model): log sequence anomaly when update appears not to "take" (#9741)
I hope this doesn't fire, but 👻 I'm Seeing Things I Can't Explain 👻
This commit is contained in:
@@ -435,8 +435,19 @@ func (s *indexHandler) receive(fs []protocol.FileInfo, update bool, op string, p
|
|||||||
}
|
}
|
||||||
|
|
||||||
fset.Update(deviceID, fs)
|
fset.Update(deviceID, fs)
|
||||||
|
|
||||||
seq := fset.Sequence(deviceID)
|
seq := fset.Sequence(deviceID)
|
||||||
|
|
||||||
|
// Check that the sequence we get back is what we put in...
|
||||||
|
if lastSequence > 0 && seq != lastSequence {
|
||||||
|
s.logSequenceAnomaly("unexpected sequence after update", map[string]any{
|
||||||
|
"prevSeq": prevSequence,
|
||||||
|
"lastSeq": lastSequence,
|
||||||
|
"batch": len(fs),
|
||||||
|
"seenSeq": fs[len(fs)-1].Sequence,
|
||||||
|
"returnedSeq": seq,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
s.evLogger.Log(events.RemoteIndexUpdated, map[string]interface{}{
|
s.evLogger.Log(events.RemoteIndexUpdated, map[string]interface{}{
|
||||||
"device": deviceID.String(),
|
"device": deviceID.String(),
|
||||||
"folder": s.folder,
|
"folder": s.folder,
|
||||||
|
|||||||
Reference in New Issue
Block a user