Ver Fonte

Fix `get_metadata_for_events` (#12904)

This method was introduced in #12852. It is using the `state_key` column from
the `events` table, which is not (yet) reliable (see #11496).
Richard van der Hoff há 2 anos atrás
pai
commit
2480461879
2 ficheiros alterados com 3 adições e 2 exclusões
  1. 1 0
      changelog.d/12904.misc
  2. 2 2
      synapse/storage/databases/main/state.py

+ 1 - 0
changelog.d/12904.misc

@@ -0,0 +1 @@
+Pull out less state when handling gaps in room DAG.

+ 2 - 2
synapse/storage/databases/main/state.py

@@ -167,8 +167,8 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore):
             )
 
             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}
             """