mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Search new sync candidate amoung potential and async standbys (#794)
In synchronos_mode_strict we put '*' into synchronos_standby_names, what makes one connection 'sync' and other connections 'potential'. The code picking up the correct sync standby didn't consider 'potential' as a good candidate. Fixes: https://github.com/zalando/patroni/issues/789
This commit is contained in:
@@ -1733,7 +1733,7 @@ $$""".format(name, ' '.join(options)), name, password, password)
|
||||
if sync_state == 'potential' and app_name == current:
|
||||
# Prefer current even if not the best one any more to avoid indecisivness and spurious swaps.
|
||||
return current, False
|
||||
if sync_state == 'async':
|
||||
if sync_state in ('async', 'potential'):
|
||||
candidates.append(app_name)
|
||||
|
||||
if candidates:
|
||||
|
||||
Reference in New Issue
Block a user