Add comments

This commit is contained in:
Neil Alexander 2020-12-09 17:15:21 +00:00
parent ccb028ad50
commit cfa1ff256c
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -1131,6 +1131,11 @@ func (d *Database) fetchMissingStateEvents(
} }
if len(stateEvents) != len(missing) { if len(stateEvents) != len(missing) {
logrus.WithContext(ctx).Warnf("Failed to map all event IDs to events (got %d, wanted %d)", len(stateEvents), len(missing)) logrus.WithContext(ctx).Warnf("Failed to map all event IDs to events (got %d, wanted %d)", len(stateEvents), len(missing))
// TODO: Why is this happening? It's probably the roomserver. Uncomment
// this error again when we work out what it is and fix it, otherwise we
// just end up returning lots of 500s to the client and that breaks
// pretty much everything, rather than just sending what we have.
//return nil, fmt.Errorf("failed to map all event IDs to events: (got %d, wanted %d)", len(stateEvents), len(missing)) //return nil, fmt.Errorf("failed to map all event IDs to events: (got %d, wanted %d)", len(stateEvents), len(missing))
} }
events = append(events, stateEvents...) events = append(events, stateEvents...)