Skip to content

Commit

Permalink
MDB-33721: reset self.checks['primary_switch']
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kopylov committed Feb 9, 2025
1 parent 30aa761 commit 8a8d4b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

#
Expand Down

0 comments on commit 8a8d4b3

Please sign in to comment.