-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Current state oscillating between join and leave states cause confusing /sync
responses (for clients)
#8434
Comments
I've often wondered at the lack of foreign keys and other constraints. |
Unfortunately since this happened back in December 2019, we're not going to be able to inspect logs and see if that helps at all. It looks like all these tables get updated in @bwindels Might be worth trying to leave that room and rejoin to see if it fixes it for you? This wouldn't help with an underlying issue though. |
It's worth noting that the following isn't doing what it first looks like:
That is fetching all membership events in the room sent by
|
Looking at initial sync:
This is a perfectly valid*, albeit confusing, response to get. Usually you'd see the (* well, I don't think Synapse is working quite as intended here, but I think this is valid according to the spec...)
This is probably because the client isn't correctly handling the above case. |
Looking at the DB the current state looks to be oscillating between the join and leave, which would explain all of this. |
/sync
responses (for clients)
presumably related to #8629 (causing the oscillation) and matrix-org/matrix-spec#1209 (state changes due to state res aren't clearly propagated to clients) |
I too seem to have Anything I can do to help debug this and/or make sure I stay out of the room? :-) |
I'm going to assume this is a somewhat expected artifact of #8629, and there's not much that can really be done about it otherwise. |
Description
@bwindels reported that upon initial sync he was seeing some weirdness with regards to the
#synapse:matrix.org
room, which is a room that in the past has been upgraded from v1 to v4. The room ID for the v1 room is!HsxjoYRFsDtWBgDQPh:matrix.org
while the v4 room is!mjbDjyNsRXndKLkHIe:matrix.org
.The weirdness he was seeing that that the v4 room showed up in the
leave
section during initial sync, yet events from it were showing up in thejoin
section of incremental syncs (not in initial sync). What's more, his client thought he was in the room, reporting the latest membership event to be:However trying to send messages into the room failed with:
Querying matrix.org's database, we find that some tables think he is in the room, while
local_current_membership
thinks he is not:The leave event in question (
$3h7iJZGFOFjO74NTSGkyTZZJ7zU1lAqzEAwq63saTls
) has the body of:So what's happened here is that
@appservice-irc:matrix.org
kicked@bwindels:matrix.org
from the room, and that did not propagate to all tables properly.Looking from my Element Desktop on my own homeserver, the correct leave state event is shown as the latest:
So somehow this kick that happened entirely locally has resulted in some corrupted state on matrix.org, and it's slightly breaking Element and Hydrogen.
Version information
The text was updated successfully, but these errors were encountered: