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: quickly process the next job after processing the cancelled DDL job (#24146) #24254

Closed

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Apr 25, 2021

cherry-pick #24146 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/24254

After apply modifications, you can push your change to this PR via:

git push [email protected]:ti-srebot/tidb.git pr/24254:release-5.0-6344f7a02e42

What problem does this PR solve?

When the owner and the receiving DDL TiDB are on the same TiDB, quickly process the next job after processing the canceled DDL job.

What is changed and how it works?

  • When the DDL job is "JobStateRollbackDone", we notify the receiving DDL TiDB to process the finished job.

  • Add a log after the DDL JOB fails.

What's Changed:

How it Works:

This optimization also enables faster testing.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Manual test (add detailed scripts or steps below)

This optimization also enables faster testing.

Before this PR:
Executing go test takes 196.455s in the DDL package.

After this PR:
Executing go test takes 134.877s in the DDL package.

Release note

  • When the owner and the receiving DDL TiDB are on the same TiDB, quickly process the next job after processing the canceled DDL job.

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot added the sig/sql-infra SIG: SQL Infra label Apr 25, 2021
@ti-srebot ti-srebot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/5.0-cherry-pick type/enhancement The issue or PR belongs to an enhancement. labels Apr 25, 2021
@ti-srebot ti-srebot added this to the v5.0.1 milestone Apr 25, 2021
@ti-srebot
Copy link
Contributor Author

@zimulala please accept the invitation then you can push to the cherry-pick pull requests.
https://github.com/ti-srebot/tidb/invitations

@zimulala
Copy link
Contributor

PTAL @xhebox @AilinKid

@xhebox
Copy link
Contributor

xhebox commented Apr 25, 2021

/lgtm

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 25, 2021
@xhebox xhebox requested a review from AilinKid April 28, 2021 02:29
@bb7133
Copy link
Member

bb7133 commented Apr 30, 2021

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • bb7133
  • xhebox

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 30, 2021
@AilinKid
Copy link
Contributor

/lgtm

@AilinKid
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: e531e87

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 10, 2021
@ti-chi-bot
Copy link
Member

@ti-srebot: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@djshow832
Copy link
Contributor

It's not very urgent, so we don't merge it into 5.0.

@djshow832 djshow832 closed this Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/cherry-pick-not-approved sig/sql-infra SIG: SQL Infra size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement. type/5.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants