mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 22:04:56 -04:00
Faster joins: persist to database (#12012)
When we get a partial_state response from send_join, store information in the database about it: * store a record about the room as a whole having partial state, and stash the list of member servers too. * flag the join event itself as having partial state * also, for any new events whose prev-events are partial-stated, note that they will *also* be partial-stated. We don't yet make any attempt to interpret this data, so API calls (and a bunch of other things) are just going to get incorrect data.
This commit is contained in:
parent
4ccc2d09aa
commit
e2e1d90a5e
12 changed files with 297 additions and 32 deletions
|
@ -519,8 +519,17 @@ class FederationHandler:
|
|||
state_events=state,
|
||||
)
|
||||
|
||||
if ret.partial_state:
|
||||
await self.store.store_partial_state_room(room_id, ret.servers_in_room)
|
||||
|
||||
max_stream_id = await self._federation_event_handler.process_remote_join(
|
||||
origin, room_id, auth_chain, state, event, room_version_obj
|
||||
origin,
|
||||
room_id,
|
||||
auth_chain,
|
||||
state,
|
||||
event,
|
||||
room_version_obj,
|
||||
partial_state=ret.partial_state,
|
||||
)
|
||||
|
||||
# We wait here until this instance has seen the events come down
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue