mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 14:53:10 -06:00
Update error
This commit is contained in:
parent
fafee7060f
commit
a2342f12df
|
|
@ -241,18 +241,10 @@ func (u *latestEventsUpdater) latestState() error {
|
||||||
return fmt.Errorf("roomState.DifferenceBetweenStateSnapshots: %w", err)
|
return fmt.Errorf("roomState.DifferenceBetweenStateSnapshots: %w", err)
|
||||||
}
|
}
|
||||||
if len(u.removed) > len(u.added) {
|
if len(u.removed) > len(u.added) {
|
||||||
logrus.Infof("INVALID STATE DELTA (%d removes, %d adds)", len(u.removed), len(u.added))
|
// This really shouldn't happen.
|
||||||
logrus.Infof("State snapshot before: %d, after: %d", u.oldStateNID, u.newStateNID)
|
// TODO: What is ultimately the best way to handle this situation?
|
||||||
logrus.Infof("Want to remove:")
|
|
||||||
for _, r := range u.removed {
|
|
||||||
logrus.Infof("* %+v", r)
|
|
||||||
}
|
|
||||||
logrus.Infof("Want to add:")
|
|
||||||
for _, a := range u.added {
|
|
||||||
logrus.Infof("* %+v", a)
|
|
||||||
}
|
|
||||||
return fmt.Errorf(
|
return fmt.Errorf(
|
||||||
"event wants to remove %d state but only add %d state - this should be impossible",
|
"invalid state delta wants to remove %d state but only add %d state",
|
||||||
len(u.removed), len(u.added),
|
len(u.removed), len(u.added),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue