summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/replication/resource.py2
-rw-r--r--synapse/storage/_base.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/synapse/replication/resource.py b/synapse/replication/resource.py
index 0996054f6b..84993b33b3 100644
--- a/synapse/replication/resource.py
+++ b/synapse/replication/resource.py
@@ -390,7 +390,7 @@ class ReplicationResource(Resource):
 
         caches = request_streams.get("caches")
 
-        if caches is not None and current_position != caches:
+        if caches is not None:
             updated_caches = yield self.store.get_all_updated_caches(
                 caches, current_position, limit
             )
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 0a2e78fd81..029f6612e6 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -894,6 +894,9 @@ class SQLBaseStore(object):
             )
 
     def get_all_updated_caches(self, last_id, current_id, limit):
+        if last_id == current_id:
+            return defer.succeed([])
+
         def get_all_updated_caches_txn(txn):
             # We purposefully don't bound by the current token, as we want to
             # send across cache invalidations as quickly as possible. Cache