Skip to content

Commit 47fe6df

Browse files
authored
Remove Generator in _prune_old_outbound_device_pokes (#17814)
Context: matrix-org/synapse#15439 (#15439) Also see discussion in #17813
1 parent 034d472 commit 47fe6df

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/17814.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Avoid lost data on some database query retries.

synapse/storage/databases/main/devices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ def _prune_txn(txn: LoggingTransaction) -> None:
14221422
DELETE FROM device_lists_outbound_last_success
14231423
WHERE destination = ? AND user_id = ?
14241424
"""
1425-
txn.execute_batch(sql, ((row[0], row[1]) for row in rows))
1425+
txn.execute_batch(sql, [(row[0], row[1]) for row in rows])
14261426

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

0 commit comments

Comments
 (0)