Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-745: Set timeoutSeconds to 50sec #746

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions clustering/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ import (
)

const (
switchOverTimeoutSeconds = 70
failOverTimeoutSeconds = 3600
timeoutSeconds = 50
)

var (
Expand Down Expand Up @@ -163,7 +162,7 @@ func (p *managerProcess) switchover(ctx context.Context, ss *StatusSet) error {
return fmt.Errorf("failed to get the primary status: %w", err)
}

err = ss.DBOps[ss.Candidate].WaitForGTID(ctx, pst.GlobalVariables.ExecutedGTID, switchOverTimeoutSeconds)
err = ss.DBOps[ss.Candidate].WaitForGTID(ctx, pst.GlobalVariables.ExecutedGTID, timeoutSeconds)
if err != nil {
return err
}
shunki-fujita marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -241,7 +240,7 @@ func (p *managerProcess) failover(ctx context.Context, ss *StatusSet) error {

gtid := candidates[candidate].ReplicaStatus.RetrievedGtidSet
log.Info("waiting for the new primary to execute all retrieved transactions", "index", candidate, "gtid", gtid)
err = ss.DBOps[candidate].WaitForGTID(ctx, gtid, failOverTimeoutSeconds)
err = ss.DBOps[candidate].WaitForGTID(ctx, gtid, timeoutSeconds)
if err != nil {
return err
}
shunki-fujita marked this conversation as resolved.
Show resolved Hide resolved
shunki-fujita marked this conversation as resolved.
Show resolved Hide resolved
Expand Down