Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Update docstring to clarify that get_partial_state_events_batch does not just give you completely arbitrary partial-state events. #14417

Merged
merged 2 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/14417.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update docstring to clarify that `get_partial_state_events_batch` does not just give you completely arbitrary partial-state events.
10 changes: 9 additions & 1 deletion synapse/storage/databases/main/events_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2235,7 +2235,15 @@ async def is_partial_state_event(self, event_id: str) -> bool:
return result is not None

async def get_partial_state_events_batch(self, room_id: str) -> List[str]:
"""Get a list of events in the given room that have partial state"""
"""
Get a list of events in the given room that:
- have partial state; and
- are ready to be resynced (because they have no prev_events that are
partial-stated)

See the docstring on `_get_partial_state_events_batch_txn` for more
information.
"""
return await self.db_pool.runInteraction(
"get_partial_state_events_batch",
self._get_partial_state_events_batch_txn,
Expand Down