summary refs log tree commit diff
path: root/synapse/replication/slave/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-02-22 14:38:14 +0000
committerErik Johnston <erik@matrix.org>2019-02-22 14:38:14 +0000
commit80467bbac3be6e008b807793dfd27c733936c15c (patch)
tree068a11cb1ce858a75571cdb899eeb770484ab3ae /synapse/replication/slave/storage
parentAdd prometheus metrics for number of badge update pushes. (#4709) (diff)
downloadsynapse-80467bbac3be6e008b807793dfd27c733936c15c.tar.xz
Fix state cache invalidation on workers
Diffstat (limited to 'synapse/replication/slave/storage')
-rw-r--r--synapse/replication/slave/storage/_base.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/synapse/replication/slave/storage/_base.py b/synapse/replication/slave/storage/_base.py
index 1353a32d00..817d1f67f9 100644
--- a/synapse/replication/slave/storage/_base.py
+++ b/synapse/replication/slave/storage/_base.py
@@ -59,12 +59,7 @@ class BaseSlavedStore(SQLBaseStore):
                     members_changed = set(row.keys[1:])
                     self._invalidate_state_caches(room_id, members_changed)
                 else:
-                    try:
-                        getattr(self, row.cache_func).invalidate(tuple(row.keys))
-                    except AttributeError:
-                        # We probably haven't pulled in the cache in this worker,
-                        # which is fine.
-                        pass
+                    self._attempt_to_invalidate_cache(row.cache_func, tuple(row.keys))
 
     def _invalidate_cache_and_stream(self, txn, cache_func, keys):
         txn.call_after(cache_func.invalidate, keys)