-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
@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 { |
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.
==
is better ?
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.
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
}
LGTM |
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
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.