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

executeRestoreFullBackup should use context from caller to pass down to 'restoreFiles' #12830

Closed
rsajwani opened this issue Apr 4, 2023 · 0 comments · Fixed by #12828
Closed

Comments

@rsajwani
Copy link
Contributor

rsajwani commented Apr 4, 2023

Description

Currently executeRestoreFullBackup calls to restoreFiles using context.Background(), this implies that it can run forever. Since executeRestoreFullBackup ignores the ctx passed to it by the caller, there is no way for restore to be cancelled once it is initiated.

This can return sucessfull restore even if there was any failure down the stack during restoreFiles.

Expectation

Context cancelled or timed-out at caller level should be respcted by restoreFiles to make sure restore returns failure incase of context cancelled or timed-out.

rsajwani added a commit to planetscale/vitess that referenced this issue Apr 6, 2023
Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
deepthi pushed a commit that referenced this issue Apr 20, 2023
…2828)

* fix error reporting

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* adding test

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing bug #12830

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing some error message

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* remove unwanted comments

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* remove unwanted require in test

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fix comments

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* adding release-notes

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* feedback for summary.md

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* run tablet type with background context

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* Add check for tablet type

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fixing typo

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

* fix test bug

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>

---------

Signed-off-by: Rameez Sajwani <rameezwazirali@hotmail.com>
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 a pull request may close this issue.

1 participant