-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Synapse is sending events to appservices multiple times #11447
Comments
Is this consistently reproducible (i.e. every time you follow the steps, it happens)? Will contact you for logs in Matrix. EDIT: acquired logs |
(I have received the logs: this is just waiting on me to get time to trawl through them, sorry!) |
I'm struggling to reproduce this issue. I've set up 3 homeservers Using I then remove the Looking at the requests made to the application service, only one copy of each message is received. N.B. I've also attempted to reproduce by using the federation blacklist: blacklisting syn3 from syn2 (restarting each time), but tried the In your case, is the network outage between the two servers lasting more than an hour? Do you reproduce this consistently — does it happen every time? Finally, looking at your logs, I couldn't see which messages were duplicate — if you could help out there I would be grateful. Sorry if I'm just being stupid! |
One important information might be that we do fairly frequently purge events older than a couple of minutes from our homeserver. Perhaps it is a combination of the network partitioning and the purging of the already seen events? |
Aha, that's interesting! The first thing I'm led to wonder is: what happens if we purge an event, then receive it again (e.g. from its origin homeserver which was not able to send it to us before)? This sounds like it would be worth trying to reproduce. I'll have a try soon (edit: I had a try and have most of a jig set up, but I didn't appear to get history purging working correctly — likely a PEBKAC so I need to return to this at some stage; will assign to me for reproduction since I already have the jig set up, it may as well be me that tries to reproduce) |
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):
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
Version information
If not matrix.org:
Version: 1.47.1
Install method:
The text was updated successfully, but these errors were encountered: