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

Commit

Permalink
Remove duplicate call to wake a remote destination when using federat…
Browse files Browse the repository at this point in the history
…ion sending worker (#16515)
  • Loading branch information
realtyem authored Oct 24, 2023
1 parent 3df70aa commit ffbe9b7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
1 change: 1 addition & 0 deletions changelog.d/16515.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove duplicate call to mark remote server 'awake' when using a federation sending worker.
11 changes: 0 additions & 11 deletions synapse/replication/tcp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,6 @@ async def on_position(
# may be streaming.
self.notifier.notify_replication()

def on_remote_server_up(self, server: str) -> None:
"""Called when get a new REMOTE_SERVER_UP command."""

# Let's wake up the transaction queue for the server in case we have
# pending stuff to send to it.
if self.send_handler:
self.send_handler.wake_destination(server)

async def wait_for_stream_position(
self,
instance_name: str,
Expand Down Expand Up @@ -405,9 +397,6 @@ def __init__(self, hs: "HomeServer"):

self._fed_position_linearizer = Linearizer(name="_fed_position_linearizer")

def wake_destination(self, server: str) -> None:
self.federation_sender.wake_destination(server)

async def process_replication_rows(
self, stream_name: str, token: int, rows: list
) -> None:
Expand Down
2 changes: 0 additions & 2 deletions synapse/replication/tcp/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,6 @@ def on_REMOTE_SERVER_UP(
self, conn: IReplicationConnection, cmd: RemoteServerUpCommand
) -> None:
"""Called when get a new REMOTE_SERVER_UP command."""
self._replication_data_handler.on_remote_server_up(cmd.data)

self._notifier.notify_remote_server_up(cmd.data)

def on_LOCK_RELEASED(
Expand Down

0 comments on commit ffbe9b7

Please sign in to comment.