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.
This commit is contained in:
Erik Johnston 2017-06-07 17:34:20 +01:00
parent 3accee1a8c
commit 197bd126f0
3 changed files with 24 additions and 10 deletions

View file

@ -1419,7 +1419,7 @@ class EventsStore(SQLBaseStore):
]
rows = self._new_transaction(
conn, "do_fetch", [], None, self._fetch_event_rows, event_ids
conn, "do_fetch", [], [], None, self._fetch_event_rows, event_ids
)
row_dict = {