-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Hierarchy pagination is limited to 50 items per space #11134
Comments
_matrix/client/unstable/org.matrix.msc2946/rooms({roomId}/hierarchy
pagination broken_matrix/client/unstable/org.matrix.msc2946/rooms/{roomId}/hierarchy
pagination broken
Are you always seeing the same incorrect number of rooms returned, or does it differ between pagination attempts? And is it the same subset of rooms returned every time? What's the structure of the space with 135 children? ie. how many rooms and subspaces are there in each subspace? |
Is this a public space? If so, can you provide the room ID? |
Yes, I always get the same incorrect number of rooms returned for a specific space (but the number varies from one space to another).
Yes, always the same rooms.
The room structure is as follows:
no further sub-spaces
I've created a public dummy space with 120 space children here: edit: just to verify, |
I suspect what's happening here is that only the first 50 children of each subspace are being returned. |
that's possible. I have just added 5 children to the first subspace like this:
which is now returning 4 rooms after the second call. |
I'm seeing this exact issue when trying to migrate a list of rooms from another service over to a matrix server space. The issue appears to be that the 50 room limit is hard coded on line 52 in The limiting logic appears to come in from PR I've tested this on a local test VM. When I set this variable ( The easiest solution would seem to be expose this as a configuration variable so individual servers can override the limit as needed, but I figured I'd drop my research in for the synapse team to consider. Thanks! |
_matrix/client/unstable/org.matrix.msc2946/rooms/{roomId}/hierarchy
pagination broken
I've reworded the issue since it isn't really broken, but working as designed. Part of the problem with this code right now is that it is trying to support both the legacy |
_matrix/client/unstable/org.matrix.msc2946/rooms/{roomId}/hierarchy
returns a next_batch string for spaces with more than 50 children as expected.Pparsing the pagination token then only returns 11 rooms in my case, even though there should be much more. The Space in question has 135 space children.
Different spaces return different seemingly random numbers after the second call, but never the actual number.
To Reproduce
Steps to reproduce the behavior:
call
_matrix/client/unstable/org.matrix.msc2946/rooms({roomId}/hierarchy
for a space with more than 50 children, ideally more than 100repeat the call and parse the next_batch string
wrong number of spaces are returned
Expected behavior
tested with v1.43.0
The text was updated successfully, but these errors were encountered: