Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix query performance for /sync
Browse files Browse the repository at this point in the history
Broke in #12729.
  • Loading branch information
erikjohnston authored and David Robertson committed May 16, 2022
1 parent 7b83ac8 commit 771d204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ def _f(txn: LoggingTransaction) -> Optional[Tuple[int, int, str]]:
WHERE room_id = ?
AND stream_ordering <= ?
AND NOT outlier
AND rejections.reason IS NULL
AND rejections.event_id IS NULL
ORDER BY stream_ordering DESC
LIMIT 1
"""
Expand Down

0 comments on commit 771d204

Please sign in to comment.