diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-03-11 17:07:31 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-03-11 17:07:31 +0000 |
commit | a8a028dfce9a4eb9d55da74d8ab5c2a959c06d50 (patch) | |
tree | 667aeddb2f358db7c53ea2d81fd2f5bc1534db92 /synapse/storage | |
parent | lint (diff) | |
parent | Merge pull request #4839 from matrix-org/anoa/no_captcha_tests (diff) | |
download | synapse-a8a028dfce9a4eb9d55da74d8ab5c2a959c06d50.tar.xz |
Merge branch 'develop' into anoa/trailing_slashes_client
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/events.py | 15 | ||||
-rw-r--r-- | synapse/storage/schema/full_schemas/11/event_edges.sql | 2 |
2 files changed, 2 insertions, 15 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index 990a5eaaae..428300ea0a 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -1407,21 +1407,6 @@ class EventsStore(StateGroupWorkerStore, EventFederationStore, EventsWorkerStore values=state_values, ) - self._simple_insert_many_txn( - txn, - table="event_edges", - values=[ - { - "event_id": event.event_id, - "prev_event_id": prev_id, - "room_id": event.room_id, - "is_state": True, - } - for event, _ in state_events_and_contexts - for prev_id, _ in event.prev_state - ], - ) - # Prefill the event cache self._add_to_cache(txn, events_and_contexts) diff --git a/synapse/storage/schema/full_schemas/11/event_edges.sql b/synapse/storage/schema/full_schemas/11/event_edges.sql index 52eec88357..bccd1c6f74 100644 --- a/synapse/storage/schema/full_schemas/11/event_edges.sql +++ b/synapse/storage/schema/full_schemas/11/event_edges.sql @@ -37,6 +37,8 @@ CREATE TABLE IF NOT EXISTS event_edges( event_id TEXT NOT NULL, prev_event_id TEXT NOT NULL, room_id TEXT NOT NULL, + -- We no longer insert prev_state into this table, so all new rows will have + -- is_state as false. is_state BOOL NOT NULL, UNIQUE (event_id, prev_event_id, room_id, is_state) ); |