-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Synapse returned event in backfill that was already returned during sync #7164
Comments
I don't have the request url for the sync that returned the event initially. I did try to do a new initial sync and the event wasn't there anymore between Both my riot-web and brawl are showing the event between So possibly synapse changed it mind about where the event should appear in the timeline after having synced it to some clients? |
This is somewhat expected. Sync returns things in the order they arrive at the server; backfill returns them in the order determined by the event graph. |
Hmm, would be good to document this, as it's a pitfall for client implementers. Is this more of a protocol implication or rather a synapse implementation detail? Also, any idea which location clients should choose for the event? The sync location or the backfill location? |
well, good questions. I'm not sure if the spec actually mandates any particular ordering for either Obviously though that is a simplification and it's not really the case that one size fits all.
It's tempting to say "both", but I don't really know. It's kinda a UX decision imho. |
Right, that makes sense. So does that mean clients can assume the same ordering between The main pitfall we might want to document though is that the same event can be returned twice by the server. Clients that keep history can't assume when processing a They wouldn't be able to do this when back-filling near events previously received from a |
well again, I don't think it's specced, but in practice that's probably a safe assumption to make. |
Can close this then as it's mainly a spec documentation issue, if any. |
Ftr, the client-server spec says on |
istr there's an open issue in matrix-doc about this |
Steps to reproduce
$1585350022333PFkGE:lant.uk
, before$158535013295770ZmONI:matrix.org
(the 1st event in the backfill)$1585352285101062xfUvo:matrix.org
and$1585352478298tKJwR:lant.uk
The same event is thus returned to be at 2 locations in the timeline.
The event came from another server, at a time that the federation was lagging considerably.
The text was updated successfully, but these errors were encountered: