-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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 the covert job to rollingback job (#23903) #24080
ddl: fix the covert job to rollingback job (#23903) #24080
Conversation
Signed-off-by: ti-srebot <[email protected]>
/run-all-tests |
@AilinKid you're already a collaborator in bot's repo. |
PTAL @tangenta @crazycs520 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/LGTM |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: c93da0e
|
/merge |
/merge |
2 similar comments
/merge |
/merge |
cherry-pick #23903 to release-5.0
You can switch your code base to this Pull Request by using git-extras:
# In tidb repo: git pr https://github.com/pingcap/tidb/pull/24080
After apply modifications, you can push your change to this PR via:
Signed-off-by: AilinKid [email protected]
What problem does this PR solve?
Issue Number: close #23893
Once
convertJob2RollbackJob
meets error, the job state can't be set asJobStateRollingback
sincejob state and args may not be correctly overwritten. The job will be fetched to run with the canceling
state again. So we should check the error count here.
What is changed and how it works?
What's Changed:
change all the rollingback assignments to the last step in all ddl canceling logic.
This is aim to get rid of invalid job state and job args, while the job is assigned with rollingback state, which will lead errors in following rollingback logic, for example, json unmarshal error.
Add error count check and force it be canceled in convertJob2RollbackJob
This is aim to get rid of the infinite loop of canceling action once
convertJob2RollbackJob
gets an error.Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Release note