feat: Support omitting members in the send_join response #977
No reviewers
continuwuation/Owners
Labels
No labels
Bug
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/Federation
Matrix/MSC
Matrix/Media
Meta
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
To-Merge
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: continuwuation/continuwuity#977
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nex/feat/provide-fast-joins"
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?
This PR allows us to omit membership events in our
/send_join
endpoint, allowing us to provide fast/partial joins. Joining a room via a continuwuity server with this change should be significantly faster and weigh less on the server itself.This does not allow us to use fast/partial joins, that is a feature being kinda worked on in nex/feat/fast-joins-hack-do-not-use-DO-NOT-USE (but as the branch name says do not use it)
@ -238,6 +258,17 @@ async fn create_join_event(
.rooms
.auth_chain
.event_ids_iter(room_id, starting_events)
// .broad_filter_map(|event_id| async {
This was commented out as for whatever reason, not including events in the auth chain that are already in the state object caused synapse to explode. Still, without this, this is already a large improvement. Remove commented code before merge?
@ -257,0 +296,4 @@
.await;
// If there's no servers, just add us
let servers = if servers.is_empty() {
vec![services.globals.server_name().to_string()]
This should never happen, but also bees shouldn't be able to fly (this did happen in my testing)
WIP: feat: Support omitting members in the send_join responseto feat: Support omitting members in the send_join response@ -211,3 +215,3 @@
drop(mutex_lock);
debug!("Fetching current state IDs");
should be trace, it contains no valuable timing information or whatever
@ -219,9 +223,25 @@ async fn create_join_event(
.collect()
.await;
#[allow(clippy::unnecessary_unwrap)]
This wrap is in fact necessary otherwise the warning turns into an error
could use expect to have this comment in the code
@ -257,0 +286,4 @@
let servers_in_room: Option<Vec<_>> = if !omit_members {
None
} else {
debug!("Fetching list of servers in room");
Should also be a trace
@ -257,0 +302,4 @@
};
Some(servers)
};
debug!("Returning send_join data");
Another one for trace
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.