Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
shunki-fujita committed Jul 10, 2024
1 parent 8af6a69 commit 76df80e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clustering/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ func (p *managerProcess) switchover(ctx context.Context, ss *StatusSet) error {
select {
case err := <-done:
if err != nil {
if errKill := pdb.KillConnections(ctx); errKill != nil {
return fmt.Errorf("failed to make instance %d read-only: %w, and failed to kill connections: %w", ss.Primary, err, errKill)
}
return fmt.Errorf("failed to make instance %d read-only: %w", ss.Primary, err)
}
time.Sleep(100 * time.Millisecond)
Expand Down

0 comments on commit 76df80e

Please sign in to comment.