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

Commit

Permalink
Update docstring to clarify that get_partial_state_events_batch doe…
Browse files Browse the repository at this point in the history
…s not just give you completely arbitrary partial-state events. (#14417)
  • Loading branch information
reivilibre authored Nov 15, 2022
1 parent 64dd8a9 commit 634359b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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 @@ -2228,7 +2228,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

0 comments on commit 634359b

Please sign in to comment.