summary refs log tree commit diff
path: root/synapse/replication/tcp/resource.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-12-31 13:40:45 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-12-31 13:40:45 +0000
commit3efa169750189237e05a9ddd4dbd11c64a443310 (patch)
tree25aff106d041d259d5017617a7e1aa2bcabb02a0 /synapse/replication/tcp/resource.py
parentMerge commit '24229fac0' into anoa/dinsic_release_1_23_1 (diff)
parentNote support for Python 3.9 (#8665) (diff)
downloadsynapse-3efa169750189237e05a9ddd4dbd11c64a443310.tar.xz
Merge commit '88e1d0c52' into anoa/dinsic_release_1_23_1
Diffstat (limited to 'synapse/replication/tcp/resource.py')
-rw-r--r--synapse/replication/tcp/resource.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/replication/tcp/resource.py b/synapse/replication/tcp/resource.py

index 666c13fdb7..1d4ceac0f1 100644 --- a/synapse/replication/tcp/resource.py +++ b/synapse/replication/tcp/resource.py
@@ -117,6 +117,16 @@ class ReplicationStreamer: stream.discard_updates_and_advance() return + # We check up front to see if anything has actually changed, as we get + # poked because of changes that happened on other instances. + if all( + stream.last_token == stream.current_token(self._instance_name) + for stream in self.streams + ): + return + + # If there are updates then we need to set this even if we're already + # looping, as the loop needs to know that he might need to loop again. self.pending_updates = True if self.is_looping: