pingcap / pingcap/tidb

Provide better error message for `admin cancel ddl`

Open
#60,279 1 comment 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
If DDL owner encounters an error, it will record it in DDL.error
In https://github.com/pingcap/tidb/blob/master/pkg/ddl/rollingback.go#L653-L666
The previous error covered `Cancelled DDL job`. It will return `DDL job rollback, error msg:...` to the client.

To improve it:
If the error is retried successfully, we should return `Cancelled DDL job` to the client.
If the error is still retrying, we should explain that the DDL is terminated by `Admin cancel DDL`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.