This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Faster joins: Creating events from local users: Track the set of forward safe chain events and use them as prev_events
#14057
Labels
A-Federated-Join
joins over federation generally suck
T-Enhancement
New features, changes in functionality, improvements in performance, or user-facing enhancements.
Part of #12997.
Definitions
Safe chain: Chain of events created by local users since (and including) the join event sent in
/send_join
and up to and including the most recent event we have created.Events in the safe chain are safe to divulge to remote homeservers that we believe to be in the room (i.e. because they're on the list that we received from partial
/send_join
)Forward safe chain event(s): Set of locally-created events in the safe chain that do not have any locally-created events naming them as
prev_events
. Analogous to forward extremities; we'll use these for theprev_events
of the next event we create.Typically the most recent event we have created.
Open questions:
What needs doing
We need to track the set of 'forward safe chain events', initially just the join event that we create withProbably not needed, at least not immediately./send_join
, but updated as locally-created events are persisted, analogously to forward extremities.prev_events
for any events that we create locally.get_prev_events_for_partial_join_room
andWITH RECURSIVE
query alongevent_edges
, using the join event frompartial_state_room
as the backward point.The text was updated successfully, but these errors were encountered: