diff options
author | Erik Johnston <erik@matrix.org> | 2020-03-23 18:40:03 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2020-03-23 18:52:24 +0000 |
commit | 225b993cf6d3a24e3f7e0d0be28b663e4157c53d (patch) | |
tree | 95a8cd374497bb19c53db16a5bc67b56f68840e9 /synapse/replication/tcp/client.py | |
parent | Handle connection closing under us (diff) | |
download | synapse-225b993cf6d3a24e3f7e0d0be28b663e4157c53d.tar.xz |
Remove `conn_id` usage for UserSyncCommand.
Each tcp replication connection is assigned a "conn_id", which is used to give an ID to a remotely connected worker. In a redis world, there will no longer be a one to one mapping between connection and instance, so instead we need to replace such usages with an ID generated by the remote instances and included in the replicaiton commands. This really only effects UserSyncCommand.
Diffstat (limited to 'synapse/replication/tcp/client.py')
-rw-r--r-- | synapse/replication/tcp/client.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/replication/tcp/client.py b/synapse/replication/tcp/client.py index 7e7ad0f798..e86d9805f1 100644 --- a/synapse/replication/tcp/client.py +++ b/synapse/replication/tcp/client.py @@ -189,10 +189,12 @@ class ReplicationClientHandler(AbstractReplicationClientHandler): """ self.send_command(FederationAckCommand(token)) - def send_user_sync(self, user_id, is_syncing, last_sync_ms): + def send_user_sync(self, instance_id, user_id, is_syncing, last_sync_ms): """Poke the master that a user has started/stopped syncing. """ - self.send_command(UserSyncCommand(user_id, is_syncing, last_sync_ms)) + self.send_command( + UserSyncCommand(instance_id, user_id, is_syncing, last_sync_ms) + ) def send_remove_pusher(self, app_id, push_key, user_id): """Poke the master to remove a pusher for a user |