diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-12-29 16:54:03 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-06-22 15:54:48 +0100 |
commit | 9850f66abe97ecaa54ece3223bd415cf0f581d4a (patch) | |
tree | b344058eff89740522a42b142ead8a1b72c21744 /synapse/storage/events.py | |
parent | Merge pull request #3432 from matrix-org/rav/joined_hosts_cache_non_iterable (diff) | |
download | synapse-9850f66abe97ecaa54ece3223bd415cf0f581d4a.tar.xz |
Deleting from event_push_actions needs to use an index
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index cb1082e864..7d0e59538a 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -1044,7 +1044,6 @@ class EventsStore(EventsWorkerStore): "event_edge_hashes", "event_edges", "event_forward_extremities", - "event_push_actions", "event_reference_hashes", "event_search", "event_signatures", @@ -1064,6 +1063,14 @@ class EventsStore(EventsWorkerStore): [(ev.event_id,) for ev, _ in events_and_contexts] ) + for table in ( + "event_push_actions", + ): + txn.executemany( + "DELETE FROM %s WHERE room_id = ? AND event_id = ?" % (table,), + [(ev.event_id,) for ev, _ in events_and_contexts] + ) + def _store_event_txn(self, txn, events_and_contexts): """Insert new events into the event and event_json tables |