summary refs log tree commit diff
path: root/synapse/storage/databases/main/devices.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2023-06-01 14:25:20 +0100
committerGitHub <noreply@github.com>2023-06-01 13:25:20 +0000
commit5ed0e8c61f6b46289fdc5609e8e573b67c2c1982 (patch)
treebd61aa59037eac5dc4f8ce9aec7e321a37240c39 /synapse/storage/databases/main/devices.py
parentImplement stable support for MSC3882 to allow an existing device/session to g... (diff)
downloadsynapse-5ed0e8c61f6b46289fdc5609e8e573b67c2c1982.tar.xz
Cache requests for user's devices from federation (#15675)
This should mitigate the issue where lots of different servers requests
the same user's devices all at once.
Diffstat (limited to 'synapse/storage/databases/main/devices.py')
-rw-r--r--synapse/storage/databases/main/devices.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py

index a67fdb3c22..f677d048aa 100644 --- a/synapse/storage/databases/main/devices.py +++ b/synapse/storage/databases/main/devices.py
@@ -1941,6 +1941,10 @@ class DeviceStore(DeviceWorkerStore, DeviceBackgroundUpdateStore): user_id, stream_ids[-1], ) + txn.call_after( + self._get_e2e_device_keys_for_federation_query_inner.invalidate, + (user_id,), + ) min_stream_id = stream_ids[0]