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 all stuff about backgroud DDL worker. #4227

Merged
merged 2 commits into from
Aug 18, 2017
Merged

Conversation

hicqu
Copy link
Contributor

@hicqu hicqu commented Aug 18, 2017

It will causes TiDB upgrade without VERSION 15 lost something in GC. But if our next version doesn't support inplace upgrade, it's OK.

@hicqu hicqu requested review from zimulala and shenli August 18, 2017 03:29
@hicqu
Copy link
Contributor Author

hicqu commented Aug 18, 2017

@zimulala , PTAL.

@@ -111,19 +111,7 @@ func (d *ddl) finishDDLJob(t *meta.Meta, job *model.Job) (err error) {
switch job.Type {
case model.ActionDropSchema, model.ActionDropTable, model.ActionTruncateTable, model.ActionDropIndex:
if job.Version <= currentVersion {
Copy link
Contributor

Choose a reason for hiding this comment

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

== is better ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both are OK. I prefer <= because I think it's more clear:

if version <= currentversion {
    if version == someSpecifiedVersion {
        // do special logic.
    } else if version == specialVersion2 {
        // do special logic.
    }
    // do some downstream logic.
} else {
    // Error here
}

@zimulala
Copy link
Contributor

LGTM

@zimulala zimulala added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 18, 2017
winkyao
winkyao previously approved these changes Aug 18, 2017
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

@winkyao winkyao added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Aug 18, 2017
@hanfei1991 hanfei1991 merged commit 5340b67 into master Aug 18, 2017
@hanfei1991 hanfei1991 deleted the qupeng/ddl-clean branch August 18, 2017 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants