summary refs log tree commit diff
path: root/synapse/storage/databases/state/store.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-23 18:25:38 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-23 18:25:38 +0100
commit69d83ca0f099bc2ce7a78d69fdaa1fb7ad30b099 (patch)
treee8a5109643abf6407a233dc78fa7988a619b807f /synapse/storage/databases/state/store.py
parentMerge commit 'c6f8e8086' into anoa/dinsic_release_1_31_0 (diff)
parent 1.31.0rc1 (diff)
downloadsynapse-69d83ca0f099bc2ce7a78d69fdaa1fb7ad30b099.tar.xz
Merge commit '78e48f61b' into anoa/dinsic_release_1_31_0
Diffstat (limited to 'synapse/storage/databases/state/store.py')
-rw-r--r--synapse/storage/databases/state/store.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/storage/databases/state/store.py b/synapse/storage/databases/state/store.py

index e2240703a7..97ec65f757 100644 --- a/synapse/storage/databases/state/store.py +++ b/synapse/storage/databases/state/store.py
@@ -183,12 +183,13 @@ class StateGroupDataStore(StateBackgroundUpdateStore, SQLBaseStore): requests state from the cache, if False we need to query the DB for the missing state. """ - is_all, known_absent, state_dict_ids = cache.get(group) + cache_entry = cache.get(group) + state_dict_ids = cache_entry.value - if is_all or state_filter.is_full(): + if cache_entry.full or state_filter.is_full(): # Either we have everything or want everything, either way # `is_all` tells us whether we've gotten everything. - return state_filter.filter_state(state_dict_ids), is_all + return state_filter.filter_state(state_dict_ids), cache_entry.full # tracks whether any of our requested types are missing from the cache missing_types = False @@ -202,7 +203,7 @@ class StateGroupDataStore(StateBackgroundUpdateStore, SQLBaseStore): # There aren't any wild cards, so `concrete_types()` returns the # complete list of event types we're wanting. for key in state_filter.concrete_types(): - if key not in state_dict_ids and key not in known_absent: + if key not in state_dict_ids and key not in cache_entry.known_absent: missing_types = True break