summary refs log tree commit diff
path: root/synapse/storage/databases/state/store.py
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-24 13:50:50 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-24 13:50:50 +0100
commit5588baee91a4832d2a0d4add20a81d6a7a15c5ee (patch)
tree1a0790a3396c51fb53ae81ab6338dc1af6beddab /synapse/storage/databases/state/store.py
parentSplit out into helper function (diff)
downloadsynapse-5588baee91a4832d2a0d4add20a81d6a7a15c5ee.tar.xz
Tweak this; we can do better
Diffstat (limited to 'synapse/storage/databases/state/store.py')
-rw-r--r--synapse/storage/databases/state/store.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/storage/databases/state/store.py b/synapse/storage/databases/state/store.py
index 06f6a13cab..04eddbeffd 100644
--- a/synapse/storage/databases/state/store.py
+++ b/synapse/storage/databases/state/store.py
@@ -423,10 +423,13 @@ class StateGroupDataStore(StateBackgroundUpdateStore, SQLBaseStore):
             ] = []
             for group in inflight_cache_misses:
                 if db_state_filter.include_others:
-                    # we can't intelligently cache include_others under any other keys
-                    # because we don't know what keys are included.
+                    # We can't properly add cache keys for all the 'other'
+                    # state keys that `include_others` specifies (since there are
+                    # an unlimited number of 'other' state keys), but we can
+                    # add a cache key with the exact state filter in use
+                    # (in addition to cache keys specifying the definite state
+                    # keys we are requesting).
                     keys.append((group, db_state_filter))
-                    continue
 
                 for event_type, state_keys in db_state_filter.types.items():
                     if state_keys is None: