diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-09-05 17:08:54 +0100 |
---|---|---|
committer | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-09-05 17:08:54 +0100 |
commit | ecee5f10f49487f0b6628fea065914ea3e685a79 (patch) | |
tree | e7c6c2ef69e275c45da11ed48b6777a2ab7ebbaf /roomserver/internal | |
parent | bea3dbe77bac078f07927df54c63f145df8a0caf (diff) |
Tweak logging for detected state resets
Diffstat (limited to 'roomserver/internal')
-rw-r--r-- | roomserver/internal/input/input_latest_events.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roomserver/internal/input/input_latest_events.go b/roomserver/internal/input/input_latest_events.go index ec662672..7a4105ab 100644 --- a/roomserver/internal/input/input_latest_events.go +++ b/roomserver/internal/input/input_latest_events.go @@ -275,7 +275,7 @@ func (u *latestEventsUpdater) latestState() error { return fmt.Errorf("roomState.DifferenceBetweenStateSnapshots: %w", err) } - if removed := len(u.removed) - len(u.added); removed > 0 { + if removed := len(u.removed) - len(u.added); !u.rewritesState && removed > 0 { logrus.WithFields(logrus.Fields{ "event_id": u.event.EventID(), "room_id": u.event.RoomID(), @@ -283,7 +283,7 @@ func (u *latestEventsUpdater) latestState() error { "new_state_nid": u.newStateNID, "old_latest": u.oldLatest.EventIDs(), "new_latest": u.latest.EventIDs(), - }).Errorf("Unexpected state deletion (removing %d events)", removed) + }).Warnf("State reset detected (removing %d events)", removed) } // Also work out the state before the event removes and the event |