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 parallel execution of "drop DB" and other DDL issue #17566

Merged
merged 5 commits into from
Jun 4, 2020

Conversation

zimulala
Copy link
Contributor

@zimulala zimulala commented Jun 1, 2020

What problem does this PR solve?

Issue Number: close #17565

Problem Summary:
Parallel execution of "drop database" and other DDL (such as "alter database") may cause panic.
Because we don't check the return value in GetDatabase in the background.

What is changed and how it works?

What's Changed:

How it Works:
After executing GetDatabase, we need to check whether the return value is nil.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

Release note

  • Fix the issue that parallel execution of "drop database" and other DDL may cause panic.

@zimulala zimulala added type/bugfix This PR fixes a bug. needs-cherry-pick-3.0 sig/sql-infra SIG: SQL Infra labels Jun 1, 2020
@codecov
Copy link

codecov bot commented Jun 1, 2020

Codecov Report

Merging #17566 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #17566   +/-   ##
===========================================
  Coverage   79.4684%   79.4684%           
===========================================
  Files           520        520           
  Lines        140204     140204           
===========================================
  Hits         111418     111418           
  Misses        19805      19805           
  Partials       8981       8981           

Copy link
Member

@wjhuang2016 wjhuang2016 left a comment

Choose a reason for hiding this comment

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

LGTM

@zimulala zimulala added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 2, 2020
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

LGTM

@AilinKid AilinKid added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 3, 2020
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

/run-all-tests

@zimulala zimulala added status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Jun 3, 2020
@zimulala zimulala added the status/can-merge Indicates a PR has been approved by a committer. label Jun 3, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Jun 3, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jun 3, 2020

@zimulala merge failed.

@bb7133
Copy link
Member

bb7133 commented Jun 4, 2020

/run-all-tests

@bb7133 bb7133 merged commit 788dc28 into pingcap:master Jun 4, 2020
sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Jun 4, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 4, 2020

cherry pick to release-3.0 in PR #17657

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Jun 4, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 4, 2020

cherry pick to release-3.1 in PR #17658

@zimulala zimulala deleted the get-db branch June 4, 2020 04:28
sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Jun 4, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 4, 2020

cherry pick to release-4.0 in PR #17659

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/can-merge Indicates a PR has been approved by a committer. status/LGT3 The PR has already had 3 LGTM. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallel execution of "drop database" and other DDL may cause panic.
6 participants