summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-06-08 11:21:03 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-06-08 11:21:03 +0100
commitefc5febc330724d37dca77b2b8634c1b7a960718 (patch)
tree4c7dbb43d161a6c8040a1eaa56e39c931486ecc7 /synapse/storage
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
parentWhen joining a remote room limit the number of events we concurrently check s... (diff)
downloadsynapse-efc5febc330724d37dca77b2b8634c1b7a960718.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/database.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py
index 974703d13a..b77368a460 100644
--- a/synapse/storage/database.py
+++ b/synapse/storage/database.py
@@ -541,6 +541,7 @@ class DatabasePool:
                         },
                     ):
                         r = func(cursor, *args, **kwargs)
+                        opentracing.log_kv({"message": "commit"})
                         conn.commit()
                         return r
                 except self.engine.module.OperationalError as e:
@@ -556,7 +557,8 @@ class DatabasePool:
                     if i < N:
                         i += 1
                         try:
-                            conn.rollback()
+                            with opentracing.start_active_span("db.rollback"):
+                                conn.rollback()
                         except self.engine.module.Error as e1:
                             transaction_logger.warning("[TXN EROLL] {%s} %s", name, e1)
                         continue
@@ -569,7 +571,8 @@ class DatabasePool:
                         if i < N:
                             i += 1
                             try:
-                                conn.rollback()
+                                with opentracing.start_active_span("db.rollback"):
+                                    conn.rollback()
                             except self.engine.module.Error as e1:
                                 transaction_logger.warning(
                                     "[TXN EROLL] {%s} %s",