summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAndrew Morgan <andrewm@element.io>2022-09-26 16:13:53 +0100
committerAndrew Morgan <andrewm@element.io>2022-09-26 16:13:53 +0100
commit8acd2c01bca39c174b06595c7be43e8bad2877b3 (patch)
tree79f13dab0784d13db48164d9682d839d634c845a /synapse
parentwip2 (diff)
downloadsynapse-anoa/new_cache.tar.xz
Diffstat (limited to 'synapse')
-rw-r--r--synapse/util/caches/dual_lookup_cache.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/util/caches/dual_lookup_cache.py b/synapse/util/caches/dual_lookup_cache.py
index 6ee72de705..be97d4a988 100644
--- a/synapse/util/caches/dual_lookup_cache.py
+++ b/synapse/util/caches/dual_lookup_cache.py
@@ -217,10 +217,10 @@ class DualLookupCache(Generic[PKT, PVT, SKT]):
                 key,
             )
             for primary_key in primary_key_set:
-                logger.info("*** Popping entry from primary_dict: %s", primary_key)
+                primary_value = self._primary_dict.pop(primary_key)
+                logger.info("*** Popping entry from primary_dict: %s - %s", primary_key, primary_value)
                 logger.info("*** primary_dict: %s", self._primary_dict)
-                popped_primary_dict_values = self._primary_dict[primary_key]
-                del self._primary_dict[primary_key]
+                popped_primary_dict_values.append(primary_value)
 
             # Now return the unmodified copy of the set.
             return popped_primary_dict_values