-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Implement MSC3827: Filtering of /publicRooms
by room type
#13031
Implement MSC3827: Filtering of /publicRooms
by room type
#13031
Conversation
cb8bea3
to
ec975f1
Compare
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
ec975f1
to
297f9ad
Compare
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
297f9ad
to
8199e87
Compare
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a follow on for another time: Now that room_stats_state
contains room_type
, there are one or two places where we can avoid an event fetch. eg. if we make get_room_with_stats
return room_type
, we can avoid fetching the m.room.create
event in RoomSummaryHandler._build_room_entry
.
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment, otherwise it's looking really good!
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I missed another small thing earlier - the docstring for test_background_add_room_type_column
needs an update.
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
Thanks! |
You figured out my plan with adding this here! 🎉 (Seems this got filed as #13130.) |
async def _background_add_room_type_column( | ||
self, progress: JsonDict, batch_size: int | ||
) -> int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure where to make this thread, so I'll do it here (I didn't see this previously discussed on the PR, but do let me know if I missed it!)
Since this is a background update I'm assuming the new room_type
column is null
for all rows until we fill in it. This will cause incorrect results to be returned until the background update is complete -- do we think this is "fine" until it is done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is "fine" though I am not sure if I should be the one to judge that
Not sure if this could be avoided anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for this use-case it is most likely fine too, just was curious if I had missed a conversation about it.
matrix-org/synapse#13031 originally added support for the feature to Synapse, which although doesn't include an obvious federation route it does end up sending the field over federation. [Here](https://github.com/matrix-org/synapse/blob/a6895dd576f96d7fd086fb4128d48ac8a3f098c5/synapse/federation/transport/client.py#L481) the server copies the search filter just before it goes over the wire, which is supplied by through a chain of function calls originating [here](https://github.com/matrix-org/synapse/blob/c6d617641186221829c644204f24654430858826/synapse/rest/client/room.py#L456). Additionally, it is clear that this sort of feature would have included federation given the filtering is able to be proxied directly like this (as demonstrated by Synapse above). As such, this is determined to be a clarification/minor edit to the MSC, not requiring a second MSC to add the functionality.
matrix-org/synapse#13031 originally added support for the feature to Synapse, which although doesn't include an obvious federation route it does end up sending the field over federation. [Here](https://github.com/matrix-org/synapse/blob/a6895dd576f96d7fd086fb4128d48ac8a3f098c5/synapse/federation/transport/client.py#L481) the server copies the search filter just before it goes over the wire, which is supplied by through a chain of function calls originating [here](https://github.com/matrix-org/synapse/blob/c6d617641186221829c644204f24654430858826/synapse/rest/client/room.py#L456). Additionally, it is clear that this sort of feature would have included federation given the filtering is able to be proxied directly like this (as demonstrated by Synapse above). As such, this is determined to be a clarification/minor edit to the MSC, not requiring a second MSC to add the functionality.
Implement MSC3827: Filtering of
/publicRooms
by room typeTowards element-hq/element-meta#338