-
Notifications
You must be signed in to change notification settings - Fork 221
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
Some rooms do not get sent down via sliding sync; rooms impacted differ per account #17781
Comments
Hi, that's deeply concerning. I'd be interested to know the outcomes of the following queries, with the room ID and user ID of the room/user in question: SELECT * FROM background_updates; SELECT sender != user_id, membership, room_type FROM sliding_sync_membership_snapshots WHERE room_id = ? AND user_id = ? SELECT room_id, room_type FROM sliding_sync_joined_rooms WHERE room_id = ? SELECT membership FROM local_current_membership WHERE room_id = ? AND user_id = ? |
Hello, here are the responses to those queries.
|
Huh, so looks like the DB is in a sane state (I was worried that there might have been a problem with the background update). I'd be interested in knowing if the room appeared in the responses to the following requests (you'll need to get an access token from the
|
It gives me two different kinds of responses depending on the room I do it for. When I do it for a room that does not show up on Element X for that account, it gives the following:
When I do it for a room that does show up on Element X for that account, it gives me what I'm guessing is expected output, including |
Interesting, interesting. So the room isn't being incorrectly filtered out by the room lists. Can you run (to see if it returns anything): SELECT m.room_id, m.sender, m.membership, m.membership_event_id,
r.room_version,
m.event_instance_name, m.event_stream_ordering,
m.has_known_state,
COALESCE(j.room_type, m.room_type),
COALESCE(j.is_encrypted, m.is_encrypted)
FROM sliding_sync_membership_snapshots AS m
INNER JOIN rooms AS r USING (room_id)
LEFT JOIN sliding_sync_joined_rooms AS j ON (j.room_id = m.room_id AND m.membership = 'join')
WHERE user_id = ?
AND m.forgotten = 0
AND m.room_id = ? And: SELECT room_version FROM rooms WHERE room_id = ? SELECT membership, forgotten FROM room_memberships WHERE room_id = ? AND user_id = ? These are the queries that pull the room info from the DB, so should show us if its not returning the room for some reason and if so why. |
Here's step 3 again for another room that doesn't show up on Element X (this one is room version 9, not 10):
And here's step 3 again for a room that does show up on Element X (room version 10):
Here are some possibly relevant configuration options we have set:
With regard to the above, it should be noted that the issue happens for both Synapse admin and non-Synapse-admin accounts. |
Aha, looks like SELECT membership_event_id, membership, forgotten
FROM sliding_sync_membership_snapshots
WHERE room_id = ? AND user_id = ? SELECT event_id, membership, forgotten
FROM room_memberships AS m
INNER JOIN events USING (event_id)
WHERE m.room_id = ? AND m.user_id = ?
ORDER BY events.depth ASC SELECT event_id, membership
FROM local_current_membership
WHERE room_id = ? AND user_id = ? The idea being that we want to see if a) all the event IDs match with the same membership, and b) if |
We have |
OK great. That's the problem then, somehow the |
Thanks for the report @composite9239! The fix will be included in the next upcoming release and existing rooms affected by the bug will automatically be fixed by a background update that will run after you upgrade. |
Excellent, thank you very much! |
Description
Leaving and rejoining a room causes a new login on Element X to not receive the rooms via sliding sync.
Steps to reproduce
It was confirmed via Element X logs that the rooms don't get sent down via sliding sync.
Homeserver
another homeserver
Synapse Version
1.115.0
Installation Method
Other (please mention below)
Database
PostgreSQL 17.0
Workers
Multiple workers
Platform
Ubuntu 22.04.5 LTS
Configuration
No response
Relevant log output
Anything else that would be useful to know?
using matrix-docker-ansible-deploy playbook with specialized-workers preset
native sliding sync (no proxy)
The text was updated successfully, but these errors were encountered: