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

Fix a bug which could lead to incorrect state #13278

Merged
merged 11 commits into from
Jul 15, 2022
4 changes: 3 additions & 1 deletion synapse/storage/controllers/persist_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,8 @@ async def _get_new_state_after_events(
state_res_store=StateResolutionStore(self.main_store),
)

full_state = await res.get_state(self._state_controller)
erikjohnston marked this conversation as resolved.
Show resolved Hide resolved

state_resolutions_during_persistence.inc()

# If the returned state matches the state group of one of the new
Expand All @@ -948,7 +950,7 @@ async def _get_new_state_after_events(
events_context,
)

return res.state, None, new_latest_event_ids
return full_state, None, new_latest_event_ids
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops. Sorry.


async def _prune_extremities(
self,
Expand Down