diff --git a/src/main.py b/src/main.py index 730afa9..3e0444d 100644 --- a/src/main.py +++ b/src/main.py @@ -1256,6 +1256,8 @@ def _return_to_cluster(self, new_primary, role, is_dead=False): logging.info('Trying to do a simple WAL source switch to: {}'.format(new_primary)) result = self._try_simple_primary_switch_with_lock(limit, new_primary, is_dead) logging.info('WAL source switch count: %s finish with result: %s', self.checks['primary_switch'], result) + if result: + self.checks['primary_switch'] = 0 return None #