mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
Remove Generator
in store_search_entries_txn
(#17817)
Context: https://github.com/matrix-org/synapse/issues/15439 (https://github.com/element-hq/synapse/issues/15439) Also see discussion in https://github.com/element-hq/synapse/pull/17813
This commit is contained in:
parent
af59a99933
commit
2e5fe3f187
2 changed files with 3 additions and 2 deletions
1
changelog.d/17817.bugfix
Normal file
1
changelog.d/17817.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Avoid lost data on some database query retries.
|
|
@ -94,7 +94,7 @@ class SearchWorkerStore(SQLBaseStore):
|
||||||
VALUES (?,?,?,to_tsvector('english', ?),?,?)
|
VALUES (?,?,?,to_tsvector('english', ?),?,?)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
args1 = (
|
args1 = [
|
||||||
(
|
(
|
||||||
entry.event_id,
|
entry.event_id,
|
||||||
entry.room_id,
|
entry.room_id,
|
||||||
|
@ -104,7 +104,7 @@ class SearchWorkerStore(SQLBaseStore):
|
||||||
entry.origin_server_ts,
|
entry.origin_server_ts,
|
||||||
)
|
)
|
||||||
for entry in entries
|
for entry in entries
|
||||||
)
|
]
|
||||||
|
|
||||||
txn.execute_batch(sql, args1)
|
txn.execute_batch(sql, args1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue