-
Notifications
You must be signed in to change notification settings - Fork 188
*: only retry for special message with 1105 #330
Conversation
Codecov Report
@@ Coverage Diff @@
## master #330 +/- ##
================================================
- Coverage 59.9177% 59.8898% -0.0279%
================================================
Files 135 135
Lines 15079 15076 -3
================================================
- Hits 9035 9029 -6
- Misses 5163 5167 +4
+ Partials 881 880 -1 |
@WangXiangUSTC @amyangfei PTAL |
@@ -238,7 +238,7 @@ func (conn *DBConn) executeSQLWithIgnore(tctx *tcontext.Context, ignoreError fun | |||
sqlRetriesTotal.WithLabelValues("stmt_exec", conn.cfg.Name).Add(1) | |||
return true | |||
} | |||
if retry.IsRetryableErrorFastFailFilter(err) { | |||
if retry.IsRetryableError(err) { |
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.
why change to this function? seems change retry logic for ddl
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.
IsRetryableErrorFastFailFilter
as a black-list for 1105
, but we have changed to use a white-list for 1105
now.
so, the fast fail error in IsRetryableErrorFastFailFilter
will not be retry in IsRetryableError
.
UnsupportedDDLMsgs
still not be retry.
LGTM |
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
cherry pick to release-1.0 in PR #332 |
What problem does this PR solve?
1105
means an unknown error in MySQL/TiDB. some of these errors are retryable, but some are not (likeerror="Error 1105: statement count 5001 exceeds the transaction limitation
).What is changed and how it works?
only retry for retryable errors, now including:
Information schema is out of date
Information schema is changed
Check List
Tests
Related changes