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

Prefill client IPs cache on workers #4818

Merged
merged 3 commits into from
Mar 6, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/4818.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prefill client IPs cache on workers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think this could do with expanding a bit

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
)