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

Conversation

Projects
None yet
5 participants
@winkyao
Copy link
Member

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

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

This comment has been minimized.

Copy link
Member

zhouqiang-cl commented Dec 12, 2018

/rebuild

@winkyao

This comment has been minimized.

Copy link
Member

winkyao commented Dec 13, 2018

winkyao added some commits Dec 13, 2018

Show resolved Hide resolved ddl/db_test.go Outdated
@crazycs520

This comment has been minimized.

Copy link
Contributor

crazycs520 commented Jan 2, 2019

/run-all-tests

winkyao added some commits Jan 2, 2019

@crazycs520
Copy link
Contributor

crazycs520 left a comment

LGTM

@crazycs520

This comment has been minimized.

Copy link
Contributor

crazycs520 commented Jan 2, 2019

Please Merge pingcap/check#12 first.

@crazycs520

This comment has been minimized.

Copy link
Contributor

crazycs520 commented Jan 2, 2019

/run-all-tests

winkyao added some commits Jan 2, 2019

@ciscoxll
Copy link
Member

ciscoxll left a comment

LGTM

Also need a LGTM

@ciscoxll ciscoxll added the status/LGT2 label Jan 2, 2019

checkErr = errors.Trace(errs[0])
return
}
txn, err = hookCtx.Txn(true)

This comment has been minimized.

@zimulala

zimulala Jan 2, 2019

Member

Why do you want to do it again?

@zimulala
Copy link
Member

zimulala left a comment

LGTM

@winkyao winkyao merged commit b8b3a7f into pingcap:master Jan 2, 2019

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@winkyao winkyao deleted the winkyao:fix_cancel_panic branch Jan 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment