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

ddl: fix can't cancel a job when add index meets panic #8621

Merged
merged 15 commits into from
Jan 2, 2019
Merged

ddl: fix can't cancel a job when add index meets panic #8621

merged 15 commits into from
Jan 2, 2019

Conversation

winkyao
Copy link
Contributor

@winkyao winkyao commented Dec 7, 2018

What problem does this PR solve?

Before this PR, if TiDB panic in backfillIndexInTxn, we can't cancel the ddl job, because the handleBackfillTask check cancels state after the panic, and panic will be caught by recover(), and never know the job is canceled.

  • Need to cherry-pick to the release branch

This change is Reviewable

ddl/db_test.go Outdated Show resolved Hide resolved
@zhouqiang-cl
Copy link
Contributor

/rebuild

@winkyao
Copy link
Contributor Author

winkyao commented Dec 13, 2018

@zimulala @crazycs520 @ciscoxll PTAL

ddl/db_test.go Outdated Show resolved Hide resolved
@crazycs520
Copy link
Contributor

/run-all-tests

Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crazycs520
Copy link
Contributor

Please Merge pingcap/check#12 first.

@crazycs520
Copy link
Contributor

/run-all-tests

ciscoxll
ciscoxll previously approved these changes Jan 2, 2019
Copy link
Contributor

@ciscoxll ciscoxll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ciscoxll ciscoxll dismissed their stale review January 2, 2019 08:51

Also need a LGTM

@ciscoxll ciscoxll added the status/LGT2 Indicates that a PR has LGTM 2. label Jan 2, 2019
checkErr = errors.Trace(errs[0])
return
}
txn, err = hookCtx.Txn(true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want to do it again?

Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@winkyao winkyao merged commit b8b3a7f into pingcap:master Jan 2, 2019
@winkyao winkyao deleted the fix_cancel_panic branch January 2, 2019 09:38
@you06 you06 added the sig/sql-infra SIG: SQL Infra label Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants