summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-14 14:51:06 +0100
committerErik Johnston <erik@matrix.org>2015-05-14 14:51:06 +0100
commit7f4105a5c99d72662db0704ab03bff24a951005b (patch)
tree0b3ba07bd6e6810ba489d2f9b94b011eeebeb4d8 /synapse
parentPEP8 (diff)
downloadsynapse-7f4105a5c99d72662db0704ab03bff24a951005b.tar.xz
Turn off preemptive transactions
Diffstat (limited to '')
-rw-r--r--synapse/storage/events.py24
1 files changed, 7 insertions, 17 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 28d2c0896b..0aa4e0d445 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -420,23 +420,13 @@ class EventsStore(SQLBaseStore):
                 if e_id in event_map and event_map[e_id]
             ])
 
-        if not txn:
-            missing_events = yield self.runInteraction(
-                "_get_events",
-                self._fetch_events_txn,
-                missing_events_ids,
-                check_redacted=check_redacted,
-                get_prev_content=get_prev_content,
-                allow_rejected=allow_rejected,
-            )
-        else:
-            missing_events = yield self._fetch_events(
-                txn,
-                missing_events_ids,
-                check_redacted=check_redacted,
-                get_prev_content=get_prev_content,
-                allow_rejected=allow_rejected,
-            )
+        missing_events = yield self._fetch_events(
+            txn,
+            missing_events_ids,
+            check_redacted=check_redacted,
+            get_prev_content=get_prev_content,
+            allow_rejected=allow_rejected,
+        )
 
         event_map.update(missing_events)