summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-08 18:34:18 +0100
committerErik Johnston <erik@matrix.org>2014-09-08 18:34:18 +0100
commitc0577ea87a19c169d68ed83760582fa1fabe36e5 (patch)
tree0f4add68e13156b3700ac8f54c389c32277cfc14
parentAdded /join description (diff)
downloadsynapse-c0577ea87a19c169d68ed83760582fa1fabe36e5.tar.xz
Rollback if we try and insert duplicate events
-rw-r--r--synapse/storage/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 81c3c94b2e..8ed80109a5 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -179,6 +179,7 @@ class DataStore(RoomMemberStore, RoomStore,
                 "Failed to persist, probably duplicate: %s",
                 event.event_id
             )
+            txn.rollback()
             return
 
         if not backfilled and hasattr(event, "state_key"):