-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
LL members can get out of sync with server on limited sync response #7211
Comments
Can't repro in a room on localhost server with 4 joined + 1 invited members. I did notice another bug, where one of the joined members in the room forgot about the invited user. The invite event was in the room timeline, but not present in the room state nor the accumulated sync data. Seems like a Riot bug. Looking into it now, but these two issues couldn't be related you think? |
UPDATE: see comment below first The problem described above is also hard to reproduce, but I noticed one thing in the sync response after accepting an invite (so when the room appear under "join" for the first time): the state events are not complete. I don't receive the state at the point where I join. Instead I only get what seem to be the 3 first state events (m.room.create, m.room.member for room creator, m.room.power_levels). I would have expected the invite member event for another member to be in there that was invite just before me.
Is this how it is supposed to work @ara4n ? |
Creating a ticket for the issue described above, as it's probably not related to what happend with uhoreg where join event seems to have been fabricated. #7243 |
Right, looks like you might have found another bug with this "sync on joining is wrong". Separately, I've reproduced the original bug - it looks to be a problem with limited syncs. To reproduce:
This is very sytest-able and just a screwup in the impl, i guess; I didn't explicitly test limited syncs. |
Actually, my issue isn't really synapse's fault. It's correct that the state is missing for the members who joined during the gap, given by definition if they're not in the timeline, and the current contract for LL is that you only get state for members who are in the timeline. Instead, it's an edge case that after a limited (aka gappy) sync, we would have to do a full bg resync of the members list to go and fill in the details of any changes which happened during the gap. So, to fix this, either we:
I'm not sure what the right soln is, tbh. On one hand, just making synapse include the state during a gappy sync is kinda appealing as it will fix this without changes on the clients, and typically there won't be too much of a delta. On the other hand, most sophisticated clients (e.g. Riot on all platforms) only ever do initial sync at initial launch, and thereafter always do an incremental sync - so if they're offline for weeks and then relaunch, the relaunch could be delayed by needlessly pulling in tonnes of membership events. Having written it out, i think we should optimise for the smallest possible syncs, given we might have better ways in future for pulling in the membership data selectively (rather than the very blunt hack of currently resyncing the whole membership list in the bg). In other words, responsivity is more important than bandwidth utilisation. |
i've split out the other issue into #7303 |
@bmarty pointed me to the exact same issue on friday, suggesting we should refetch the members when receiving a gap in a timeline. I had it on my todo-list to check how riot-web handles this (e.g. if it always back-fills the gap, but that seems unlikely.) |
Conclusion from IRLing on this this morning is that we don't really have enough metrics on how fast/slow incremental sync acts in the wild in order to make an educated decision on how to address this.
meanwhile, we want to see just how slow incremental syncs are (in terms of the server processing & network bandwidth) time on the clients in general, for which we don't have metrics
in the short term, I'll disable LL on incremental syncs entirely, and so fix the bug like that. and then once we've gathered metrics from both server & clients, we can decide what the correct solution actually based on the data, where are options are:
|
(i guess another option could be to ditch doing the bg /members and just pull in the profile data when needed. however, this doesn't play well with nick autocomplete, offline support, rapidly filtering the membership list and other places where you might need the full membership list) |
Remaining action point for riot-web is to add some tracking as described below:
|
Split of the above comment into #7327 as this is tracking the synapse work which is done. |
This happened |
For the record, this bug in Element was worked around by disabling LL for gappy syncs in Synapse (matrix-org/synapse#3840). In other words: it's still a bug in Element, but it gets away with it because Synapse doesn't implement this particular bit of the spec. Other spec-compliant implementations could cause the bug to resurface. Indeed, there are reports of buggy behavior with Conduit which could be caused by such bugs. |
I have filed #27285 about this. |
I invited uhoreg into a private dev room; he clearly joined, but in practice LL clients show him to still be invited. We see RRs from him though.
The text was updated successfully, but these errors were encountered: