summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2023-08-23 14:00:34 +0100
committerGitHub <noreply@github.com>2023-08-23 14:00:34 +0100
commitec662bbe413bd976af97f099ea4f11dafaf98b3e (patch)
treed76bf8ade92a8a250b7b6c23f069822cbc93606b /synapse/storage
parentFix rare deadlock when using read/write locks (#16133) (diff)
downloadsynapse-ec662bbe413bd976af97f099ea4f11dafaf98b3e.tar.xz
Filter out unwanted user_agents from udv. (#16124)
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/databases/main/client_ips.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/client_ips.py b/synapse/storage/databases/main/client_ips.py
index 0df160d2b0..d8d333e11d 100644
--- a/synapse/storage/databases/main/client_ips.py
+++ b/synapse/storage/databases/main/client_ips.py
@@ -579,6 +579,11 @@ class ClientIpWorkerStore(ClientIpBackgroundUpdateStore, MonthlyActiveUsersWorke
         device_id: Optional[str],
         now: Optional[int] = None,
     ) -> None:
+        # The sync proxy continuously triggers /sync even if the user is not
+        # present so should be excluded from user_ips entries.
+        if user_agent == "sync-v3-proxy-":
+            return
+
         if not now:
             now = int(self._clock.time_msec())
         key = (user_id, access_token, ip)