Skip to content

Commit

Permalink
Remove Generator in store_search_entries_txn (#17817)
Browse files Browse the repository at this point in the history
Context: matrix-org/synapse#15439
(#15439)

Also see discussion in #17813
  • Loading branch information
realtyem authored Oct 31, 2024
1 parent af59a99 commit 2e5fe3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/17817.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid lost data on some database query retries.
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def store_search_entries_txn(
VALUES (?,?,?,to_tsvector('english', ?),?,?)
"""

args1 = (
args1 = [
(
entry.event_id,
entry.room_id,
Expand All @@ -104,7 +104,7 @@ def store_search_entries_txn(
entry.origin_server_ts,
)
for entry in entries
)
]

txn.execute_batch(sql, args1)

Expand Down

0 comments on commit 2e5fe3f

Please sign in to comment.