mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 13:39:22 -05:00
Don't unnecessarily start bg process in replication sending loop. (#8670)
This commit is contained in:
parent
0c7f9cb81f
commit
4215a3acd4
1
changelog.d/8670.misc
Normal file
1
changelog.d/8670.misc
Normal file
@ -0,0 +1 @@
|
||||
Reduce number of OpenTracing spans started.
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user