diff --git a/changelog.d/18778.misc b/changelog.d/18778.misc new file mode 100644 index 00000000000..4bd0bf82bd6 --- /dev/null +++ b/changelog.d/18778.misc @@ -0,0 +1 @@ +This is a temporary newsfile. diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index acae34e71f5..ed4600049fe 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -20,7 +20,6 @@ # # import logging -import random from threading import Lock from typing import ( TYPE_CHECKING, @@ -875,7 +874,7 @@ async def handle_room_un_partial_stated(self, room_id: str) -> None: """ await self._handle_room_un_partial_stated_client( - instance_name=random.choice(self._device_list_writers), + instance_name=self._device_list_writers[-1], # TEMP room_id=room_id, ) @@ -892,7 +891,7 @@ async def notify_device_update( device_ids: The device IDs that have changed. """ await self._notify_device_update_client( - instance_name=random.choice(self._device_list_writers), + instance_name=self._device_list_writers[-1], # TEMP user_id=user_id, device_ids=list(device_ids), ) @@ -909,7 +908,7 @@ async def notify_user_signature_update( user_ids: The Matrix IDs of the users that have changed. """ await self._notify_user_signature_update_client( - instance_name=random.choice(self._device_list_writers), + instance_name=self._device_list_writers[-1], # TEMP from_user_id=from_user_id, user_ids=user_ids, ) diff --git a/synapse/replication/tcp/commands.py b/synapse/replication/tcp/commands.py index 6ab53566600..962acf2d879 100644 --- a/synapse/replication/tcp/commands.py +++ b/synapse/replication/tcp/commands.py @@ -144,6 +144,9 @@ def __init__( self.token = token self.row = row + def __repr__(self) -> str: + return f"RdataCommand(stream={self.stream_name!r}, instance={self.instance_name!r}, position={self.token!r}, row=...)" + @classmethod def from_line(cls: Type["RdataCommand"], line: str) -> "RdataCommand": stream_name, instance_name, token, row_json = line.split(" ", 3)