mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-27 03:58:06 +03:00
Need to do _background_update_progress_txn in actual transaction
This commit is contained in:
parent
e395eb1108
commit
26db18bc90
1 changed files with 9 additions and 7 deletions
|
@ -158,15 +158,17 @@ class SearchStore(BackgroundUpdateStore):
|
|||
)
|
||||
conn.set_session(autocommit=False)
|
||||
|
||||
pg = dict(progress)
|
||||
pg["have_added_indexes"] = True
|
||||
|
||||
self._background_update_progress_txn(
|
||||
conn.cursor(), self.EVENT_SEARCH_ORDER_UPDATE_NAME, progress
|
||||
)
|
||||
|
||||
yield self.runWithConnection(create_index)
|
||||
|
||||
pg = dict(progress)
|
||||
pg["have_added_indexes"] = True
|
||||
|
||||
yield self.runInteraction(
|
||||
self.EVENT_SEARCH_ORDER_UPDATE_NAME,
|
||||
self._background_update_progress_txn,
|
||||
self.EVENT_SEARCH_ORDER_UPDATE_NAME, progress,
|
||||
)
|
||||
|
||||
INSERT_CLUMP_SIZE = 1000
|
||||
|
||||
def reindex_search_txn(txn):
|
||||
|
|
Loading…
Reference in a new issue