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

retry(dm): align with tidb latest error message (#4172) #4252

Merged
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions dm/pkg/retry/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var (
// UnsupportedDDLMsgs list the error messages of some unsupported DDL in TiDB.
UnsupportedDDLMsgs = []string{
"can't drop column with index",
"with tidb_enable_change_multi_schema is disable", // https://github.com/pingcap/tidb/pull/29526
"unsupported add column",
"unsupported modify column",
"unsupported modify charset",
Expand Down
3 changes: 2 additions & 1 deletion dm/syncer/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ func isDropColumnWithIndexError(err error) bool {
return (mysqlErr.Number == errno.ErrUnsupportedDDLOperation || mysqlErr.Number == tmysql.ErrUnknown) &&
strings.Contains(mysqlErr.Message, "drop column") &&
(strings.Contains(mysqlErr.Message, "with index") ||
strings.Contains(mysqlErr.Message, "with composite index"))
strings.Contains(mysqlErr.Message, "with composite index") ||
strings.Contains(mysqlErr.Message, "with tidb_enable_change_multi_schema is disable"))
}

// handleSpecialDDLError handles special errors for DDL execution.
Expand Down
2 changes: 1 addition & 1 deletion dm/tests/drop_column_with_index/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function run() {
"\"isCanceled\": true" 1

sleep 5
check_log_not_contains "dispatch auto resume task" $WORK_DIR/worker1/log/dm-worker.log
check_log_not_contains $WORK_DIR/worker1/log/dm-worker.log "dispatch auto resume task"

run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"resume-task test" \
Expand Down
2 changes: 2 additions & 0 deletions dm/tests/others_integration_1.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
drop_column_with_index
downstream_diff_index
full_mode
sequence_sharding_optimistic
sequence_sharding_removemeta
Expand Down