diff options
author | Erik Johnston <erikj@jki.re> | 2019-03-06 19:17:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-06 19:17:39 +0000 |
commit | 1f85c2c0ce4ff6c79645669b359be4243107ee21 (patch) | |
tree | 606575052fe23fb84276e405e7cd66bd523e1275 | |
parent | Merge pull request #4815 from matrix-org/erikj/docstrings (diff) | |
parent | Update changelog (diff) | |
download | synapse-1f85c2c0ce4ff6c79645669b359be4243107ee21.tar.xz |
Merge pull request #4818 from matrix-org/erikj/prefill_client_ips
Prefill client IPs cache on workers
-rw-r--r-- | changelog.d/4818.bugfix | 1 | ||||
-rw-r--r-- | synapse/replication/slave/storage/client_ips.py | 2 |
2 files changed, 3 insertions, 0 deletions
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/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 ) |