diff options
author | Erik Johnston <erikj@jki.re> | 2016-09-21 17:04:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-21 17:04:04 +0100 |
commit | bbc0d9617f3673ed8f9d20e42d43fbb3f58d37ce (patch) | |
tree | 114994b76a0f1dbae900094e7d4ef8e485e95992 /synapse/storage/event_federation.py | |
parent | Merge pull request #1133 from matrix-org/erikj/public_room_count (diff) | |
parent | Match against event_id, rather than room_id (diff) | |
download | synapse-bbc0d9617f3673ed8f9d20e42d43fbb3f58d37ce.tar.xz |
Merge pull request #1134 from matrix-org/erikj/fix_stream_public_deletion
Fix _delete_old_forward_extrem_cache query
Diffstat (limited to 'synapse/storage/event_federation.py')
-rw-r--r-- | synapse/storage/event_federation.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py index 3d62451de9..53feaa1960 100644 --- a/synapse/storage/event_federation.py +++ b/synapse/storage/event_federation.py @@ -398,12 +398,11 @@ class EventFederationStore(SQLBaseStore): sql = (""" DELETE FROM stream_ordering_to_exterm WHERE - ( - SELECT max(stream_ordering) AS stream_ordering + room_id IN ( + SELECT room_id FROM stream_ordering_to_exterm - WHERE room_id = stream_ordering_to_exterm.room_id - ) > ? - AND stream_ordering < ? + WHERE stream_ordering > ? + ) AND stream_ordering < ? """) txn.execute( sql, |