This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Remove duplicate call to wake a remote destination when using federation sending worker#16515
Merged
clokep merged 3 commits intomatrix-org:developfrom Oct 24, 2023
realtyem:only-poke-fed-sender-once
Merged
Remove duplicate call to wake a remote destination when using federation sending worker#16515clokep merged 3 commits intomatrix-org:developfrom realtyem:only-poke-fed-sender-once
clokep merged 3 commits intomatrix-org:developfrom
realtyem:only-poke-fed-sender-once
Conversation
This one(that is being removed) in particular calls into the replication data handler that passes the call into a federation sender handler before landing in the federation sender itself. The one being kept calls directly into the federation sender.
clokep
reviewed
Oct 18, 2023
Member
There was a problem hiding this comment.
I think your analysis is correct; I did a quick flowchart of all the calls from these:
flowchart
ReplicationCommandHandler.on_REMOTE_SERVER_UP --> ReplicationDataHandler.on_remote_server_up
ReplicationDataHandler.on_remote_server_up -->|If shouldSendFederation| FederationSenderHandler.wake_destination
FederationSenderHandler.wake_destination --> FederationSender.wake_destination
ReplicationCommandHandler.on_REMOTE_SERVER_UP --> Notifier.notify_remote_server_up
Notifier.notify_remote_server_up -->|If shouldSendFederation| AbstractFederationSender.wake_destination
AbstractFederationSender.wake_destination -.->|shouldSendFederation guarantees this path| FederationSender.wake_destination
FederationSender.wake_destination --> PerDestinationQueue.attempt_new_transaction
AbstractFederationSender.wake_destination -.->FederationRemoteSendQueue.wake_destination
Notifier.notify_remote_server_up --> MatrixFederationHttpClient.wake_destination
MatrixFederationHttpClient.wake_destination --> AwakenableSleeper.wake
The tl;dr is that it looks like we can remove the ReplicationDataHandler path, as you did.
It looks like previously the notifier was only called on the main process, but #7352 changed this once the remote server up command was not relayed via the main process.
clokep
approved these changes
Oct 24, 2023
Member
clokep
left a comment
There was a problem hiding this comment.
Double checked this with @erikjohnston and we don't see any ways this could break.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
...and remove some additional code that appears to be 'dead' now.
Please read actual commit messages for details.
Pull Request Checklist
(run the linters)
Signed-off-by: Jason Little realtyem@gmail.com