diff options
author | Erik Johnston <erik@matrix.org> | 2018-10-29 14:21:43 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-10-29 14:21:43 +0000 |
commit | 664b192a3b4aa57597d9832361b025bc078ea87a (patch) | |
tree | 612942f66753385a7fbc304918b192c2710e21fa /synapse/storage/state.py | |
parent | Don't make temporary list (diff) | |
download | synapse-664b192a3b4aa57597d9832361b025bc078ea87a.tar.xz |
Fix set operations thinko
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r-- | synapse/storage/state.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index 947d3fc177..dfec57c045 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -1293,10 +1293,11 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore): retcols=("prev_state_group", "state_group",), ) - next_to_search.update(row["state_group"] for row in rows) + prevs = set(row["state_group"] for row in rows) # We don't bother re-handling groups we've already seen - next_to_search -= state_groups_seen - state_groups_seen |= next_to_search + prevs -= state_groups_seen + next_to_search |= prevs + state_groups_seen |= prevs for row in rows: # Note: Each state group can have at most one prev group |