Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4818 from matrix-org/erikj/prefill_client_ips
Browse files Browse the repository at this point in the history
Prefill client IPs cache on workers
  • Loading branch information
erikjohnston authored Mar 6, 2019
2 parents 0a6e716 + 366877c commit 1f85c2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/4818.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug where we didn't correctly throttle sending of USER_IP commands over replication.
2 changes: 2 additions & 0 deletions synapse/replication/slave/storage/client_ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def insert_client_ip(self, user_id, access_token, ip, user_agent, device_id):
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
)

0 comments on commit 1f85c2c

Please sign in to comment.