mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-13 07:02:17 -04:00
Wait for lazy join to complete when getting current state (#12872)
This commit is contained in:
parent
782cb7420a
commit
888a29f412
33 changed files with 361 additions and 82 deletions
|
@ -1139,6 +1139,24 @@ class RoomWorkerStore(CacheInvalidationWorkerStore):
|
|||
keyvalues={"room_id": room_id},
|
||||
)
|
||||
|
||||
async def is_partial_state_room(self, room_id: str) -> bool:
|
||||
"""Checks if this room has partial state.
|
||||
|
||||
Returns true if this is a "partial-state" room, which means that the state
|
||||
at events in the room, and `current_state_events`, may not yet be
|
||||
complete.
|
||||
"""
|
||||
|
||||
entry = await self.db_pool.simple_select_one_onecol(
|
||||
table="partial_state_rooms",
|
||||
keyvalues={"room_id": room_id},
|
||||
retcol="room_id",
|
||||
allow_none=True,
|
||||
desc="is_partial_state_room",
|
||||
)
|
||||
|
||||
return entry is not None
|
||||
|
||||
|
||||
class _BackgroundUpdates:
|
||||
REMOVE_TOMESTONED_ROOMS_BG_UPDATE = "remove_tombstoned_rooms_from_directory"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue