Skip to content

Commit

Permalink
Remove Generator in _prune_old_outbound_device_pokes (#17814)
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 034d472 commit 47fe6df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/17814.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid lost data on some database query retries.
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ def _prune_txn(txn: LoggingTransaction) -> None:
DELETE FROM device_lists_outbound_last_success
WHERE destination = ? AND user_id = ?
"""
txn.execute_batch(sql, ((row[0], row[1]) for row in rows))
txn.execute_batch(sql, [(row[0], row[1]) for row in rows])

logger.info("Pruned %d device list outbound pokes", count)

Expand Down

0 comments on commit 47fe6df

Please sign in to comment.