Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synapse is sending events to appservices multiple times #11447

Open
matrixbot opened this issue Dec 19, 2023 · 0 comments
Open

Synapse is sending events to appservices multiple times #11447

matrixbot opened this issue Dec 19, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 19, 2023

This issue has been migrated from #11447.


Description

As described in the issue matrix-org/matrix-appservice-irc#1499 synapse is sending events to appservices multiple times when e.g. the federation is temporarily broken. This ends up creating duplicate messages. We've seen as much as 4x the same conversation snippet being posted.

During a discussion in https://matrix.to/#/#irc:matrix.org it was pointed out (message) that this is a spec violation.

Quote of the relevant part (https://spec.matrix.org/v1.1/application-service-api/#pushing-events):

The events sent to the application service should be linearised, as if they were from the event stream. The homeserver MUST maintain a queue of transactions to send to the application service. If the application service cannot be reached, the homeserver SHOULD backoff exponentially until the application service is reachable again. As application services cannot modify the events in any way, these requests can be made without blocking other aspects of the homeserver. Homeservers MUST NOT alter (e.g. add more) events they were going to send within that transaction ID on retries, as the application service may have already processed the events.

Especially the last part (as the application service may have already processed the events.) is relevant in this context.

I can provide logs of the appservice & synapse in the given time frames. Contact me on matrix @andi:kack.it.

Steps to reproduce

  • See steps in the linked IRC appservice issue

Version information

  • Homeserver:

If not matrix.org:

  • Version: 1.47.1

  • Install method:

  • Platform: NixOS
@matrixbot matrixbot changed the title Dummy issue Synapse is sending events to appservices multiple times Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant