From 64a2acb1610cab12a84da180a027f8ab3d33b26f Mon Sep 17 00:00:00 2001
From: Erik Johnston <erik@matrix.org>
Date: Tue, 16 Aug 2016 16:44:19 +0100
Subject: [PATCH] Don't update caches replication stream if tokens haven't
 advanced

---
 synapse/replication/resource.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/synapse/replication/resource.py b/synapse/replication/resource.py
index 84993b33b3..0996054f6b 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:
+        if caches is not None and current_position != caches:
             updated_caches = yield self.store.get_all_updated_caches(
                 caches, current_position, limit
             )
-- 
GitLab