Deleting from event_push_actions needs to use an index

This commit is contained in:
Mark Haines 2016-12-29 16:54:03 +00:00
parent 2238a10b42
commit cb842dc99f

View file

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