diff options
author | Erik Johnston <erik@matrix.org> | 2017-04-10 16:48:30 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-04-10 16:48:30 +0100 |
commit | 29574fd5b3537cc272a4d792669b8d5be2a92b6f (patch) | |
tree | 18753fe16297d23997f6f001740e5e9470033b49 /synapse/app/synchrotron.py | |
parent | Typo (diff) | |
download | synapse-29574fd5b3537cc272a4d792669b8d5be2a92b6f.tar.xz |
Reduce federation presence replication traffic
This is mainly done by moving the calculation of where to send presence updates from the presence handler to the transaction queue, so we only need to send the presence event (and not the destinations) across the replication connection. Before we were duplicating by sending the full state across once per destination.
Diffstat (limited to 'synapse/app/synchrotron.py')
-rw-r--r-- | synapse/app/synchrotron.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/app/synchrotron.py b/synapse/app/synchrotron.py index d39e3161fe..7b6f82abdc 100644 --- a/synapse/app/synchrotron.py +++ b/synapse/app/synchrotron.py @@ -206,10 +206,8 @@ class SynchrotronPresence(object): @defer.inlineCallbacks def notify_from_replication(self, states, stream_id): - parties = yield self._get_interested_parties( - states, calculate_remote_hosts=False - ) - room_ids_to_states, users_to_states, _ = parties + parties = yield self._get_interested_parties(states) + room_ids_to_states, users_to_states = parties self.notifier.on_new_event( "presence_key", stream_id, rooms=room_ids_to_states.keys(), |