diff options
-rw-r--r-- | changelog.d/4354.bugfix | 1 | ||||
-rw-r--r-- | synapse/storage/_base.py | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/changelog.d/4354.bugfix b/changelog.d/4354.bugfix new file mode 100644 index 0000000000..f6b5ef961b --- /dev/null +++ b/changelog.d/4354.bugfix @@ -0,0 +1 @@ +Improve logging to synapse.storage._base._new_transaction not to swallow exceptions diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 1d3069b143..53d86d5bb9 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -264,7 +264,7 @@ class SQLBaseStore(object): name, exception_to_unicode(e1), ) continue - raise + raise e except self.database_engine.module.DatabaseError as e: if self.database_engine.is_deadlock(e): logger.warning("[TXN DEADLOCK] {%s} %d/%d", name, i, N) @@ -278,10 +278,10 @@ class SQLBaseStore(object): name, exception_to_unicode(e1), ) continue - raise + raise e except Exception as e: - logger.debug("[TXN FAIL] {%s} %s", name, e) - raise + logger.exception("[TXN FAIL] {%s} %s", name, exception_to_unicode(e)) + raise e finally: end = time.time() duration = end - start |