Skip to content

Commit

Permalink
Merge pull request #175 from matrix-org/dmr/fetch-state-txns
Browse files Browse the repository at this point in the history
Reduce DB Conn usage when fetching room state
  • Loading branch information
David Robertson committed Jun 19, 2023
2 parents ec9469e + 5081642 commit fd198b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion state/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ func (s *Storage) RoomStateAfterEventPosition(ctx context.Context, roomIDs []str
if err != nil {
return fmt.Errorf("failed to form sql query: %s", err)
}
rows, err := s.Accumulator.db.Query(s.Accumulator.db.Rebind(query), args...)
rows, err := txn.Query(txn.Rebind(query), args...)
if err != nil {
return fmt.Errorf("failed to execute query: %s", err)
}
Expand Down

0 comments on commit fd198b3

Please sign in to comment.