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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

shunki-fujita
Copy link
Contributor

Comment on lines -244 to 246
err = ss.DBOps[candidate].WaitForGTID(ctx, gtid, failOverTimeoutSeconds)
err = ss.DBOps[candidate].WaitForGTID(ctx, gtid, timeoutSeconds)
if err != nil {
return err
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can loop this if err is dbop.ErrTimeout.
https://github.com/cybozu-go/moco/blob/main/pkg/dbop/replication.go#L69

Comment on lines -166 to 168
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
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Comment on lines +243 to 246
err = ss.DBOps[candidate].WaitForGTID(ctx, gtid, timeoutSeconds)
if err != nil {
return err
}
Copy link
Member

@ymmt2005 ymmt2005 Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
err = ss.DBOps[candidate].WaitForGTID(ctx, gtid, timeoutSeconds)
if err != nil {
return err
}
REDO:
err = ss.DBOps[candidate].WaitForGTID(ctx, gtid, timeoutSeconds)
switch err {
case dbop.ErrTimeout:
goto REDO
case nil:
// ok
default:
return err
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants