Skip to content

Commit

Permalink
issue-708: Change the time to wait for SetReadOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
shunki-fujita committed Jul 9, 2024
1 parent f6a49b3 commit 1d964ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clustering/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (p *managerProcess) switchover(ctx context.Context, ss *StatusSet) error {
if err := pdb.KillConnections(ctx); err != nil {
return fmt.Errorf("failed to kill connections in instance %d: %w", ss.Primary, err)
}
case <-time.After(15 * time.Second):
case <-time.After(switchOverTimeoutSeconds):
log.Info("setReadOnly is taking too long, kill connections", "instance", ss.Primary)
if err := pdb.KillConnections(ctx); err != nil {
return fmt.Errorf("failed to kill connections in instance %d: %w", ss.Primary, err)
Expand Down

0 comments on commit 1d964ca

Please sign in to comment.