mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 19:24:10 -04:00
Await un-partial-stating after a partial-state join (#12399)
When we join a room via the faster-joins mechanism, we end up with "partial state" at some points on the event DAG. Many parts of the codebase need to wait for the full state to load. So, we implement a mechanism to keep track of which events have partial state, and wait for them to be fully-populated.
This commit is contained in:
parent
09b4f6e46d
commit
f5668f0b4a
10 changed files with 291 additions and 6 deletions
|
@ -1974,7 +1974,15 @@ class EventsWorkerStore(SQLBaseStore):
|
|||
async def get_partial_state_events(
|
||||
self, event_ids: Collection[str]
|
||||
) -> Dict[str, bool]:
|
||||
"""Checks which of the given events have partial state"""
|
||||
"""Checks which of the given events have partial state
|
||||
|
||||
Args:
|
||||
event_ids: the events we want to check for partial state.
|
||||
|
||||
Returns:
|
||||
a dict mapping from event id to partial-stateness. We return True for
|
||||
any of the events which are unknown (or are outliers).
|
||||
"""
|
||||
result = await self.db_pool.simple_select_many_batch(
|
||||
table="partial_state_events",
|
||||
column="event_id",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue