mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-15 09:58:57 -07:00
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:
parent
429672e0b4
commit
39df3173d4
@ -435,8 +435,19 @@ func (s *indexHandler) receive(fs []protocol.FileInfo, update bool, op string, p
|
||||
}
|
||||
|
||||
fset.Update(deviceID, fs)
|
||||
|
||||
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{}{
|
||||
"device": deviceID.String(),
|
||||
"folder": s.folder,
|
||||
|
Loading…
Reference in New Issue
Block a user