diff options
author | Erik Johnston <erikj@jki.re> | 2017-04-12 11:07:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 11:07:13 +0100 |
commit | 247c736b9b0b9b6f3280a3d8a48e1ad2dbfd3bc6 (patch) | |
tree | c3d446fba8df5b497d09f47c0702392240c55043 /synapse/replication | |
parent | Merge pull request #2121 from matrix-org/paul/sent-transactions-metric (diff) | |
parent | Comment (diff) | |
download | synapse-247c736b9b0b9b6f3280a3d8a48e1ad2dbfd3bc6.tar.xz |
Merge pull request #2115 from matrix-org/erikj/dedupe_federation_repl
Reduce federation replication traffic
Diffstat (limited to 'synapse/replication')
-rw-r--r-- | synapse/replication/slave/storage/events.py | 1 | ||||
-rw-r--r-- | synapse/replication/slave/storage/presence.py | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/synapse/replication/slave/storage/events.py b/synapse/replication/slave/storage/events.py index 5fd47706ef..4ca1e5aa8c 100644 --- a/synapse/replication/slave/storage/events.py +++ b/synapse/replication/slave/storage/events.py @@ -71,6 +71,7 @@ class SlavedEventStore(BaseSlavedStore): # to reach inside the __dict__ to extract them. get_rooms_for_user = RoomMemberStore.__dict__["get_rooms_for_user"] get_users_in_room = RoomMemberStore.__dict__["get_users_in_room"] + get_hosts_in_room = RoomMemberStore.__dict__["get_hosts_in_room"] get_users_who_share_room_with_user = ( RoomMemberStore.__dict__["get_users_who_share_room_with_user"] ) diff --git a/synapse/replication/slave/storage/presence.py b/synapse/replication/slave/storage/presence.py index dffc80adc3..cfb9280181 100644 --- a/synapse/replication/slave/storage/presence.py +++ b/synapse/replication/slave/storage/presence.py @@ -39,6 +39,16 @@ class SlavedPresenceStore(BaseSlavedStore): _get_presence_for_user = PresenceStore.__dict__["_get_presence_for_user"] get_presence_for_users = PresenceStore.__dict__["get_presence_for_users"] + # XXX: This is a bit broken because we don't persist the accepted list in a + # way that can be replicated. This means that we don't have a way to + # invalidate the cache correctly. + get_presence_list_accepted = PresenceStore.__dict__[ + "get_presence_list_accepted" + ] + get_presence_list_observers_accepted = PresenceStore.__dict__[ + "get_presence_list_observers_accepted" + ] + def get_current_presence_token(self): return self._presence_id_gen.get_current_token() |