Log when we prune superfluous events

This commit is contained in:
Neil Alexander 2021-07-08 13:21:27 +01:00
parent 70e4bbda3b
commit 3b4597b83f
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -14,6 +14,7 @@ import (
"github.com/matrix-org/dendrite/roomserver/types"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
)
@ -170,6 +171,7 @@ func (d *Database) AddState(
for _, event := range events {
if state[i].EventNID == event {
state = append(state[:i], state[i+1:]...)
logrus.Warn("PRUNING SUPERFLUOUS EVENT")
}
}
}