Skip to content

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

Merged
enisoc merged 3 commits intovitessio:masterfrom
planetscale:ds-should-restore
Sep 9, 2020
Merged

restore: do not change tablet type to RESTORE if not actually performing a restore#6679
enisoc merged 3 commits intovitessio:masterfrom
planetscale:ds-should-restore

Conversation

@deepthi
Copy link
Copy Markdown
Collaborator

@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 deepthi requested a review from enisoc September 9, 2020 00:15
@deepthi
Copy link
Copy Markdown
Collaborator 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.

…tore if mysql doesn't come up

Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Copy link
Copy Markdown
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