diff options
author | Erik Johnston <erik@matrix.org> | 2017-06-07 17:34:20 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-06-07 17:39:36 +0100 |
commit | 197bd126f09b0df42b2cbb0bd7e121b04ab9d670 (patch) | |
tree | d9ff1eaeebc879138f1982c1f51e3e8667d85baa /synapse/storage/__init__.py | |
parent | Merge branch 'release-v0.21.0' of github.com:matrix-org/synapse (diff) | |
download | synapse-197bd126f09b0df42b2cbb0bd7e121b04ab9d670.tar.xz |
Fix bug where state_group tables got corrupted
This is due to the fact that we prefilled caches using txn.call_after, which always gets called including on error. We fix this by making txn.call_after only fire when a transaction completes successfully, which is what we want most of the time anyway.
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r-- | synapse/storage/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index d604e7668f..349f96e24b 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -225,7 +225,8 @@ class DataStore(RoomMemberStore, RoomStore, db_conn.cursor(), name="_find_stream_orderings_for_times_txn", database_engine=self.database_engine, - after_callbacks=[] + after_callbacks=[], + final_callbacks=[], ) self._find_stream_orderings_for_times_txn(cur) cur.close() |