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

Fix get_metadata_for_events #12904

Merged
merged 1 commit into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/12904.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pull out less state when handling gaps in room DAG.
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ def get_metadata_for_events_txn(
)

sql = f"""
SELECT e.event_id, e.room_id, e.type, e.state_key FROM events AS e
LEFT JOIN state_events USING (event_id)
SELECT e.event_id, e.room_id, e.type, se.state_key FROM events AS e
LEFT JOIN state_events se USING (event_id)
WHERE {clause}
"""

Expand Down