Deleting from event_push_actions needs to use an index

matrix-org-hotfixes-tcp-repl
Mark Haines 2016-12-29 16:54:03 +00:00
parent 2238a10b42
commit cb842dc99f
1 changed files with 8 additions and 1 deletions

View File

@ -591,7 +591,6 @@ class EventsStore(SQLBaseStore):
"event_edge_hashes",
"event_edges",
"event_forward_extremities",
"event_push_actions",
"event_reference_hashes",
"event_search",
"event_signatures",
@ -610,6 +609,14 @@ class EventsStore(SQLBaseStore):
"DELETE FROM %s WHERE event_id = ?" % (table,),
[(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]
)
self._simple_insert_many_txn(
txn,