Reduce the reconnect time when replication fails. (#6617)

This commit is contained in:
Richard van der Hoff 2020-01-03 14:19:09 +00:00 committed by GitHub
parent 0495097a7f
commit 6964ea095b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

1
changelog.d/6617.misc Normal file
View file

@ -0,0 +1 @@
Reduce the reconnect time when worker replication fails, to make it easier to catch up.

View file

@ -46,7 +46,8 @@ class ReplicationClientFactory(ReconnectingClientFactory):
is required.
"""
maxDelay = 30 # Try at least once every N seconds
initialDelay = 0.1
maxDelay = 1 # Try at least once every N seconds
def __init__(self, hs, client_name, handler: AbstractReplicationClientHandler):
self.client_name = client_name