summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-07-24 20:34:45 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-07-24 20:34:45 +0100
commitcb5c37a57c387a74f6079008870cf024e674dfe5 (patch)
treef2e22424580f8188cb50d75e140d6196ee9ff8a0 /synapse/storage/state.py
parentMerge branch 'develop' into matthew/filter_members (diff)
downloadsynapse-cb5c37a57c387a74f6079008870cf024e674dfe5.tar.xz
handle the edge case for _get_some_state_from_cache where types is []
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r--synapse/storage/state.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index 86f2c2e6b1..989977c644 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -547,7 +547,13 @@ class StateGroupWorkerStore(SQLBaseStore):
                 return True
             return False
 
-        got_all = is_all or not missing_types
+        if types == [] and filtered_types is not None:
+            # special wildcard case for empty type-list but an explicit filtered_types
+            # which means that we'll try to return all types which aren't in the
+            # filtered_types list.  missing_types will always be empty, so we ignore it.
+            got_all = is_all
+        else:
+            got_all = is_all or not missing_types
 
         return {
             k: v for k, v in iteritems(state_dict_ids)