summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-07-25 11:01:36 +0100
committerRichard van der Hoff <richard@matrix.org>2018-07-25 11:05:58 +0100
commit1be94440d38ad6af64486ce31c650d0540d4049c (patch)
tree4373a0337bcadda2673f0b72d0c39cf29683989a /synapse
parentMerge pull request #3597 from matrix-org/erikj/did_forget (diff)
downloadsynapse-1be94440d38ad6af64486ce31c650d0540d4049c.tar.xz
Fix occasional 'tuple index out of range' error
This fixes a bug in _delete_existing_rows_txn which was introduced in #3435
(though it's been on matrix-org-hotfixes for *years*). This code is only called
when there is some sort of conflict the first time we try to persist an event,
so it only happens rarely. Still, the exceptions are annoying.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 906a405031..f7c4226ea2 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -1137,7 +1137,7 @@ class EventsStore(EventsWorkerStore):
         ):
             txn.executemany(
                 "DELETE FROM %s WHERE room_id = ? AND event_id = ?" % (table,),
-                [(ev.event_id,) for ev, _ in events_and_contexts]
+                [(ev.room_id, ev.event_id) for ev, _ in events_and_contexts]
             )
 
     def _store_event_txn(self, txn, events_and_contexts):