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

Commit

Permalink
Fix bug where the state deltas were incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Jul 14, 2022
1 parent df55b37 commit f98c691
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions synapse/state/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,11 @@ def _make_state_cache_entry(
delta_ids: Optional[StateMap[str]] = None

for old_group, old_state in state_groups_ids.items():
if old_state.keys() - new_state.keys():
# Currently we don't support deltas that remove keys from the state
# map.
continue

n_delta_ids = {k: v for k, v in new_state.items() if old_state.get(k) != v}
if not delta_ids or len(n_delta_ids) < len(delta_ids):
prev_group = old_group
Expand Down

0 comments on commit f98c691

Please sign in to comment.