Calling _matrix/client/v1/rooms/<roomID>/hierarchy for a space returns only a partial list of rooms for that space. #1789
Labels
No labels
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity#1789
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It has been noted that some spaces have issues with showing all of the rooms everywhere that they should. This persists on multiple clients, with the same set of rooms in all clients.
Notably, on an example of my own personal space:
Additional information:
Additional relevant information - checking m.space.child on the affected space has proven fruit-less. The room's membership or lackthereof in the partial room list appears to be wholly unrelated to whether it has the via attribute set to just the homeserver or the homeservers of all participants. It also seems unrelated to whether or not the rooms ID has the homeserver at the end of its room ID.
Relevant: https://matrix.to/#/!c10y-t1HZB9jgYr9mmaKtMDsS19HXbWRFc6d0bWGVYU/%24qn-YbgjmsF-7OkTnnCCMkHak5j3BtoyikGhgXA7QkiU?via=muoi.me&via=explodie.org&via=matrix.org. The
#NLSpace:matrix.orgspace cannot be displayed on Continuwuity.What version are you on? I am on main branch, so post-Ruma-refactor.
I have a similar problem that I could describe as Continuwuity not being able to fetch room summaries and show them to clients. As a result, many room names are missing within the space view. They either show up after a very long time, or fail to show up at all. In larger spaces, this effect is more apparent.
Take the Forgejo space (
#forgejo:matrix.org) for example, which has something like 40 rooms. When using gomuks and browsing the space via "View Timeline", I observe spurious logs of the following kind:After waiting for like 3 minutes, the space still shows most rooms with their bare names. Except for rooms that I have joined, others are empty or only load after a while.
When I went to another chat and returned to the "View Timeline" window, these spurious logs happened again in the same intensity. This suggests C10y does not ever cache room summaries for rooms that it doesn't join in.
In another space with around 150 rooms (
#NLspace:matrix.org), no rooms except for the ones I joined are ever shown at all. This has been reported in the support room via the linked message above.Now, in response to you:
Are the rooms inside these space mostly created on your own server? In my report above, the rooms are all created on remote servers and hence room summaries are needed to be fetched for all them if they're unjoined. So I'm not sure. Let me know if you have any logs relevant to fetching room summaries when you browse the space lobby from your clients.
On different clients I observe different behaviors w.r.t. to a working space - Continuwuity's:
So it seems to be a UI rendering issue per-client that is worsened by slow C-S sync issues. Ideally all rooms and their summaries are fetched soon, but it might be missing.
I believe Continuwuity can improve the situation somewhat by caching room summaries for all rooms it is aware of (even if nobody joins them). Having to refetch them every time one browses a space can be very time-consuming. Furthermore I'm not sure if they are properly sent down sync as per !779 and other syncing issues.
We intentionally don't do this, because there's no way to reasonably clear that cache, and we don't want to show users out-of-date information, or worse show a summary for a room that's no longer accessible. The speed of summary fetching for rooms that the server isn't in depends entirely on how quickly the vias can provide a summary.
Room summary requests are unrelated to sync.
The space, as well as all of its rooms, are on my own server.
While that would be my first guess, the fact that the partial list of rooms consistently shows the same rooms across all clients suggests to me that it's either not strictly a client issue or it's a mistake that all of these clients make.
I've made some progress on this.
When building the room lists that suffer from this error, clients use
_matrix/client/v1/rooms/<roomID>/hierarchy. This call returns a rooms list consisting of:These clients then build the room list based on that initial room list, rather than the rooms inside of children_state. This is a reasonable solution for them, as it saves on the API calls.
Spaces don't show all rooms in specific places in some clients.to Calling _matrix/client/v1/room_summary/<roomID> for a space returns only a partial list of rooms for that space.Calling _matrix/client/v1/room_summary/<roomID> for a space returns only a partial list of rooms for that space.to Calling _matrix/client/v1/rooms/<roomID>/hierarchy for a space returns only a partial list of rooms for that space.Made a small combo file that includes the output of the hierarchy call and the additional outputs of the summaries of missing rooms.
One more interesting observation - updating a room (i.e., creating a new one) does place the new, updated room in the room list from the hierarchy call. Removing and re-adding the room does nothing.