Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycs520 committed Dec 5, 2018
1 parent 594b5a4 commit fd9864d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions util/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func GetDDLInfo(txn kv.Transaction) (*DDLInfo, error) {
func isJobRollbackable(job *model.Job, id int64) error {
switch job.Type {
case model.ActionDropIndex:
// We can't cancel if index current state is in StateDeleteOnly or StateDeleteReorganization, otherwise will cause inconsistent between record and index.
if job.SchemaState == model.StateDeleteOnly ||
job.SchemaState == model.StateDeleteReorganization {
return ErrCannotCancelDDLJob.GenWithStackByArgs(id)
Expand Down

0 comments on commit fd9864d

Please sign in to comment.