Skip to content

Commit 3d0ebb5

Browse files
author
avandras
committed
Merge branch 'multisite' into fix/ctl-site-switchover
2 parents b57a90f + e010dc9 commit 3d0ebb5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

patroni/ha.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ def before_shutdown() -> None:
16281628
self.release_leader_key_voluntarily(checkpoint_location)
16291629
time.sleep(2) # Give a time to somebody to take the leader lock
16301630
if mode == 'multisite':
1631-
self.patroni.multisite.on_shutdown(self.state_handler.latest_checkpoint_location())
1631+
self.patroni.multisite.on_shutdown(self.state_handler.latest_checkpoint_location(), None)
16321632
if mode_control['offline']:
16331633
node_to_follow, leader = None, None
16341634
else:

patroni/multisite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def status(self) -> Dict[str, Any]:
6363
def should_failover(self) -> bool:
6464
return False
6565

66-
def on_shutdown(self, checkpoint_location: Optional[int]):
66+
def on_shutdown(self, checkpoint_location: int, prev_location: int):
6767
pass
6868

6969

@@ -172,7 +172,7 @@ def release(self):
172172
def should_failover(self):
173173
return self._failover_target is not None and self._failover_target != self.name
174174

175-
def on_shutdown(self, checkpoint_location: Optional[int]):
175+
def on_shutdown(self, checkpoint_location: int, prev_location: int):
176176
""" Called when shutdown for multisite failover has completed.
177177
"""
178178
# TODO: check if we replicated everything to standby site

0 commit comments

Comments
 (0)