Merge branch 'master' of https://github.com/matrix-org/dendrite into error-logging

This commit is contained in:
Prateek Sachan 2020-03-17 22:25:12 +05:30
commit f964bef46f
2 changed files with 2 additions and 1 deletions

View file

@ -253,7 +253,7 @@ func (s *OutputRoomEventConsumer) updateStateEvent(event gomatrixserverlib.Event
} }
prevEvent, err := s.db.GetStateEvent( prevEvent, err := s.db.GetStateEvent(
context.TODO(), event.Type(), event.RoomID(), stateKey, context.TODO(), event.RoomID(), event.Type(), stateKey,
) )
if err != nil { if err != nil {
return event, err return event, err

View file

@ -160,6 +160,7 @@ func (s *outputRoomEventsStatements) selectStateInRange(
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
defer rows.Close() // nolint: errcheck
// Fetch all the state change events for all rooms between the two positions then loop each event and: // Fetch all the state change events for all rooms between the two positions then loop each event and:
// - Keep a cache of the event by ID (99% of state change events are for the event itself) // - Keep a cache of the event by ID (99% of state change events are for the event itself)
// - For each room ID, build up an array of event IDs which represents cumulative adds/removes // - For each room ID, build up an array of event IDs which represents cumulative adds/removes