summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-07-25 23:36:31 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-07-25 23:36:31 +0100
commitbc7944e6d2ea0076badd0eba414e1ba7020eb1e6 (patch)
tree225d7f3c5dea7dc76bc07c59ed5980dd730ef61f /synapse
parentMerge branch 'develop' into matthew/filter_members (diff)
downloadsynapse-bc7944e6d2ea0076badd0eba414e1ba7020eb1e6.tar.xz
switch missing_types to be a bool
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/state.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index e38427bf9d..b27b3ae144 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -511,8 +511,8 @@ class StateGroupWorkerStore(SQLBaseStore):
 
         type_to_key = {}
 
-        # tracks which of the requested types are missing from our cache
-        missing_types = set()
+        # tracks whether any of ourrequested types are missing from the cache
+        missing_types = False
 
         for typ, state_key in types:
             key = (typ, state_key)
@@ -526,13 +526,13 @@ class StateGroupWorkerStore(SQLBaseStore):
                 # when the cache was populated it might have been done with a
                 # restricted set of state_keys, so the wildcard will not work
                 # and the cache may be incomplete.
-                missing_types.add(key)
+                missing_types = True
             else:
                 if type_to_key.get(typ, object()) is not None:
                     type_to_key.setdefault(typ, set()).add(state_key)
 
                 if key not in state_dict_ids and key not in known_absent:
-                    missing_types.add(key)
+                    missing_types = True
 
         sentinel = object()