Merge pull request #4818 from matrix-org/erikj/prefill_client_ips

Prefill client IPs cache on workers
pull/4823/head
Erik Johnston 2019-03-06 19:17:39 +00:00 committed by GitHub
commit 1f85c2c0ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

1
changelog.d/4818.bugfix Normal file
View File

@ -0,0 +1 @@
Fix bug where we didn't correctly throttle sending of USER_IP commands over replication.

View File

@ -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
)