This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Use new device_lists_changes_in_room
table for fetching device lists in /sync
#12388
Closed
Description
We added a table that tracks device list changes in a room in #12321. We can use this in /sync
(and /keys/changes
) to more efficiently calculate the device list changes without having to calculate the full set of users who share a room with the requester.
c.f.
synapse/synapse/handlers/sync.py
Lines 1313 to 1329 in 573cd0f
and
synapse/synapse/handlers/device.py
Lines 139 to 143 in 573cd0f
The tricky thing is that since the table has been added recently we need to a) only use it once our minimum schema is 69
and b) only for device list stream IDs that have happened after a.
Activity
chagai95 commentedon Apr 13, 2022
Is this ready for testing? I could merge the PR on a fork and try it out. I have an account which can't log in to new devices...
erikjohnston commentedon Apr 13, 2022
Can you try running latest
develop
, #12321 and #12365 should hopefully fix logging in and I'd be interested in how they perform in real world use cases.chagai95 commentedon Apr 13, 2022
Sorry I'm having some trouble with building the docker image so I won't be able to test this soon...
erikjohnston commentedon Apr 13, 2022
If you're running
1.56(edit:) 1.57 then there is also a hidden config option that you can set to enable the same functionality:use_new_device_lists_changes_in_room: true
, which will be enabled in1.57(edit:) 1.58 by default. Note that if you do enable it then you must not downgrade your synapse to a prior versionchagai95 commentedon Apr 15, 2022
Is this a hidden config in the release and also in the tag? I'm not using the official releases, I have a fork and I merged...
erikjohnston commentedon Apr 15, 2022
Oh sorry, I'm wrong, its not in 1.56. I'm getting the timeline wrong. It will be in 1.57 and then enabled by default in 1.58.
The commit you need is 5c9e39e, which is in the tag v1.57.0rc1.
chagai95 commentedon Apr 18, 2022
Hey @erikjohnston I managed to build a docker image and test but it seems like I still can't log in... Maybe I need to higher the cache factor? I'm using the defaults...
That's what @squahtx suggested here: #12429 (comment)
Here are the logs:
synapse.log
I found:
in line 3425 after about an hour and so since clicking the login.
richvdh commentedon May 5, 2022
I think this was fixed by #12365. @erikjohnston: if there is still outstanding work here, please can you clarify what it is.
erikjohnston commentedon May 5, 2022
#12365 only enabled using that table while registering a new device. This issue is about using the new table in a couple of other places where we do similar things.
device_lists_changes_in_room
table periodically. #13043device_list_changes_in_room
table when getting device list changes #13045