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: remove wait time after canceling a job #9648

Merged
merged 3 commits into from
Mar 18, 2019

Conversation

zimulala
Copy link
Contributor

What problem does this PR solve?

When multiple TiDBs are running bootstrap at the same time, the following information will be displayed:

...
2019/03/07 13:52:03.747 ddl_worker.go:543: [info] [ddl-worker 1, tp general] the DDL job is normal to cancel because [schema:1007]Can't create database 'test'; database exists
2019/03/07 13:52:03.747 session.go:951: [warning] con:0 compile error:
[schema:1146]Table 'mysql.global_variables' doesn't exist
select HIGH_PRIORITY variable_name, variable_value from mysql.global_variables where variable_name in ('tidb_ddl_error_count_limit')
2019/03/07 13:52:03.747 ddl_worker.go:550: [error] [ddl-worker 1, tp general] load ddl global variable error: [schema:1146]Table 'mysql.global_variables' doesn't exist
...
ArgLen:1, start time: 2019-03-07 13:52:02.701 +0000 UTC, Err:[schema:1007]Can't create database 'test'; database exists, ErrCount:1, SnapshotVersion:0
2019/03/07 13:52:03.753 ddl_worker.go:415: [info] [ddl-worker 1, tp general] run DDL job error, sleeps a while:1s then retries it.
...

What is changed and how it works?

When the job is canceled, we needn't load DDL global variables or sleep for a while.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Copy link
Contributor

@winkyao winkyao 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 Mar 13, 2019
@zimulala
Copy link
Contributor Author

/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

@zimulala zimulala added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 14, 2019
@zimulala
Copy link
Contributor Author

/run-unit-test

@codecov
Copy link

codecov bot commented Mar 14, 2019

Codecov Report

Merging #9648 into master will increase coverage by 0.0187%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master      #9648        +/-   ##
================================================
+ Coverage   67.2198%   67.2386%   +0.0187%     
================================================
  Files           381        381                
  Lines         79835      79835                
================================================
+ Hits          53665      53680        +15     
+ Misses        21381      21372         -9     
+ Partials       4789       4783         -6

Copy link
Contributor

@xiekeyi98 xiekeyi98 left a comment

Choose a reason for hiding this comment

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

LGTM

@xiekeyi98 xiekeyi98 added status/all tests passed status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Mar 18, 2019
@zimulala zimulala merged commit 875ae5e into pingcap:master Mar 18, 2019
@zimulala zimulala deleted the ddl-save-time branch March 18, 2019 06:49
zimulala added a commit to zimulala/tidb that referenced this pull request Mar 18, 2019
@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/LGT3 The PR has already had 3 LGTM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants