-
Notifications
You must be signed in to change notification settings - Fork 188
Conversation
@Ehco1996: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
pkg/retry/errors.go
Outdated
@@ -82,7 +83,7 @@ var ( | |||
func IsConnectionError(err error) bool { | |||
err = errors.Cause(err) | |||
switch err { | |||
case driver.ErrBadConn, tmysql.ErrBadConn, gmysql.ErrBadConn: | |||
case driver.ErrBadConn, tmysql.ErrBadConn, gmysql.ErrBadConn, mysql.ErrInvalidConn: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may not retry the ErrInvalidConn
when it came from txn.Commit()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, we will ignore invalid connection error for some DDL.
Line 79 in fadd543
invalidConnF := func(tctx *tcontext.Context, err error, ddls []string, index int, conn *dbconn.DBConn) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: bf605b2
|
In response to a cherrypick label: new pull request created: #1916. |
What problem does this PR solve?
Auto retry for
and tidb'smysql.ErrInvalidConn
kv.RetryableErr
(by pingcap/tidb-tools#452).close #1825
What is changed and how it works?
When sql client interrupt (e.g. manually killed bykill tidb xxx
), go-mysql will returnmysql.ErrInvalidConn
and this error is safe to auto-retry build the connectionkv.RetryableErr
(currently only caused by TxnLockNotFound) is retryable too.Check List
Tests
Code changes
Side effects
Related changes