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:
Jason Little 2024-10-30 20:15:57 -05:00 committed by GitHub
parent af59a99933
commit 2e5fe3f187
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

1
changelog.d/17817.bugfix Normal file
View File

@ -0,0 +1 @@
Avoid lost data on some database query retries.

View File

@ -94,7 +94,7 @@ class SearchWorkerStore(SQLBaseStore):
VALUES (?,?,?,to_tsvector('english', ?),?,?)
"""
args1 = (
args1 = [
(
entry.event_id,
entry.room_id,
@ -104,7 +104,7 @@ class SearchWorkerStore(SQLBaseStore):
entry.origin_server_ts,
)
for entry in entries
)
]
txn.execute_batch(sql, args1)