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

restore: do not change tablet type to RESTORE if not actually performing a restore #6679

Merged
merged 3 commits into from
Sep 9, 2020

Conversation

deepthi
Copy link
Member

@deepthi deepthi commented Sep 9, 2020

Signed-off-by: deepthi deepthi@planetscale.com

@deepthi deepthi requested a review from sougou as a code owner September 9, 2020 00:11
…ing a restore

Signed-off-by: deepthi <deepthi@planetscale.com>
@deepthi
Copy link
Member Author

deepthi commented Sep 9, 2020

Re: "Also would it make sense for Restore() to call ShouldRestore()?" from #6641 (comment)

I looked at the code paths and decided that the chunk of code at the beginning of Restore can be deleted.
Either the caller knows a restore should happen (deleteBeforeRestore true), or they should call ShouldRestore and handle the result before calling Restore.

go/vt/mysqlctl/backup.go Outdated Show resolved Hide resolved
go/vt/mysqlctl/backup.go Show resolved Hide resolved
go/vt/vttablet/tabletmanager/restore.go Outdated Show resolved Hide resolved
go/vt/vttablet/tabletmanager/restore.go Show resolved Hide resolved
…tore if mysql doesn't come up

Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Copy link
Member

@enisoc enisoc left a comment

Choose a reason for hiding this comment

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

LGTM

@enisoc enisoc merged commit ec2e971 into vitessio:master Sep 9, 2020
@enisoc enisoc deleted the ds-should-restore branch September 9, 2020 19:49
@deepthi deepthi added this to the v7.0.2 milestone Sep 9, 2020
deepthi added a commit to planetscale/vitess that referenced this pull request Sep 9, 2020
…ing a restore (vitessio#6679)

* restore: do not change tablet type to RESTORE if not actually performing a restore

Signed-off-by: deepthi <deepthi@planetscale.com>

* restore: cleanup usage of ErrExistingDB, improve comments, do not restore if mysql doesn't come up

Signed-off-by: deepthi <deepthi@planetscale.com>

* restore: remove ErrExistingDB which is no longer needed

Signed-off-by: deepthi <deepthi@planetscale.com>
@deepthi deepthi removed this from the v7.0.2 milestone Sep 9, 2020
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants