mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-18 04:13:10 -06:00
Merge branch 'master' of https://github.com/matrix-org/dendrite into error-logging
This commit is contained in:
commit
f964bef46f
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue