From face0c5b3c8ed6d0f29f7eaa3a2f9fd19eb99540 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 6 Mar 2019 17:39:32 +0000 Subject: Prefill client IPs cache on workers --- synapse/replication/slave/storage/client_ips.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/synapse/replication/slave/storage/client_ips.py b/synapse/replication/slave/storage/client_ips.py index 60641f1a49..5b8521c770 100644 --- a/synapse/replication/slave/storage/client_ips.py +++ b/synapse/replication/slave/storage/client_ips.py @@ -43,6 +43,8 @@ class SlavedClientIpStore(BaseSlavedStore): if last_seen is not None and (now - last_seen) < LAST_SEEN_GRANULARITY: return + self.client_ip_last_seen.prefill(key, now) + self.hs.get_tcp_replication().send_user_ip( user_id, access_token, ip, user_agent, device_id, now ) -- cgit 1.4.1 From 7791c5194ef87132d9c708bf4c8d2991547721fc Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 6 Mar 2019 17:40:51 +0000 Subject: Newsfile --- changelog.d/4818.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/4818.misc diff --git a/changelog.d/4818.misc b/changelog.d/4818.misc new file mode 100644 index 0000000000..d101aca03c --- /dev/null +++ b/changelog.d/4818.misc @@ -0,0 +1 @@ +Prefill client IPs cache on workers. -- cgit 1.4.1 From 366877c579436b074c78f62eb4ae7c12e8a4adeb Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 6 Mar 2019 19:04:52 +0000 Subject: Update changelog --- changelog.d/4818.bugfix | 1 + changelog.d/4818.misc | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 changelog.d/4818.bugfix delete mode 100644 changelog.d/4818.misc diff --git a/changelog.d/4818.bugfix b/changelog.d/4818.bugfix new file mode 100644 index 0000000000..ebbc27a433 --- /dev/null +++ b/changelog.d/4818.bugfix @@ -0,0 +1 @@ +Fix bug where we didn't correctly throttle sending of USER_IP commands over replication. diff --git a/changelog.d/4818.misc b/changelog.d/4818.misc deleted file mode 100644 index d101aca03c..0000000000 --- a/changelog.d/4818.misc +++ /dev/null @@ -1 +0,0 @@ -Prefill client IPs cache on workers. -- cgit 1.4.1