Skip to content

Commit

Permalink
Avoid updating redundant destinations
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed May 20, 2024
1 parent db39ef0 commit 19f78d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion synapse/storage/databases/main/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2131,7 +2131,8 @@ async def mark_redundant_device_lists_pokes(
sql = """
UPDATE device_lists_changes_in_room
SET converted_to_destinations = true
WHERE stream_id > ? AND user_id = ? and device_id = ? AND room_id = ?;
WHERE stream_id > ? AND user_id = ? AND device_id = ?
AND room_id = ? AND NOT converted_to_destinations
"""

def mark_redundant_device_lists_pokes_txn(txn: LoggingTransaction) -> None:
Expand Down

0 comments on commit 19f78d4

Please sign in to comment.