summary refs log tree commit diff
path: root/synapse/storage/databases
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-05-16 16:30:35 +0100
committerGitHub <noreply@github.com>2022-05-16 16:30:35 +0100
commit4ea546067dcdd5a3e67adc56a02645a2724636c8 (patch)
treed880c0cddba191f952db517ab8835208b816fb06 /synapse/storage/databases
parentMove 1.59 warning to the top (diff)
downloadsynapse-4ea546067dcdd5a3e67adc56a02645a2724636c8.tar.xz
Fix query performance for /sync (#12745)
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r--synapse/storage/databases/main/stream.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/stream.py b/synapse/storage/databases/main/stream.py
index 3c3137fe64..0373af86c8 100644
--- a/synapse/storage/databases/main/stream.py
+++ b/synapse/storage/databases/main/stream.py
@@ -750,7 +750,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
                 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
             """