Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
don't resume task for error (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
WangXiangUSTC authored Jun 15, 2020
1 parent 533ab57 commit 5c16d69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dm/worker/task_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,19 +263,19 @@ func isResumableError(err *pb.ProcessError) bool {
case pb.ErrorType_ExecSQL:
// not elegant code, because TiDB doesn't expose some error
for _, msg := range retry.UnsupportedDDLMsgs {
if err.Error != nil && strings.Contains(err.Error.RawCause, msg) {
if err.Error != nil && strings.Contains(strings.ToLower(err.Error.RawCause), strings.ToLower(msg)) {
return false
}
}
for _, msg := range retry.UnsupportedDMLMsgs {
if err.Error != nil && strings.Contains(err.Error.RawCause, msg) {
if err.Error != nil && strings.Contains(strings.ToLower(err.Error.RawCause), strings.ToLower(msg)) {
return false
}
}
case pb.ErrorType_UnknownError:
if err.Error != nil && err.Error.ErrCode == int32(terror.ErrParserParseRelayLog.Code()) {
for _, msg := range retry.ParseRelayLogErrMsgs {
if strings.Contains(err.Error.Message, msg) {
if strings.Contains(strings.ToLower(err.Error.Message), strings.ToLower(msg)) {
return false
}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/retry/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var (
"unsupported modify charset",
"unsupported modify collate",
"unsupported drop integer primary key",
"Unsupported collation",
}

// UnsupportedDMLMsgs list the error messages of some un-recoverable DML, which is used in task auto recovery
Expand Down

0 comments on commit 5c16d69

Please sign in to comment.