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

Avoid recording the pre-restore errors in syncagent server restore info #529

Merged
merged 2 commits into from Aug 28, 2020

Conversation

shuo-wu
Copy link
Contributor

@shuo-wu shuo-wu commented Aug 26, 2020

After the discussion with @joshimoo, we need to avoid recording the errors before performing the actual restore. Otherwise, the related replica will be marked as ERROR once there is a restore file locking timeout, which is bad for the user experience.

longhorn/longhorn#1279

@shuo-wu shuo-wu marked this pull request as ready for review August 27, 2020 02:06
Copy link
Contributor

@joshimoo joshimoo left a comment

Choose a reason for hiding this comment

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

Logic looks good to me, left some suggestions.

pkg/replica/backup.go Outdated Show resolved Hide resolved
pkg/sync/rpc/server.go Outdated Show resolved Hide resolved
Shuo Wu added 2 commits August 28, 2020 16:52
…ore info

1. If `backupstore.RestoreDeltaBlockBackup` or
`backupstore.RestoreDeltaBlockBackupIncrementally` fails, the restore is
actually not performed.
2. Considering there may be file locking timeout error can be returned by the
above functions, it's better not to record error and mark the replica as ERROR.

Longhorn #1279

Signed-off-by: Shuo Wu <shuo@rancher.com>
Signed-off-by: Shuo Wu <shuo@rancher.com>
Copy link
Contributor

@joshimoo joshimoo left a comment

Choose a reason for hiding this comment

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

LGTM thanks for picking up the suggestions 👍

@joshimoo
Copy link
Contributor

joshimoo commented Oct 7, 2020

This change was to differentiate between restore initiation failures and actual failures during the restore.
related to backup locks longhorn/longhorn#612

@shuo-wu shuo-wu deleted the restore branch July 19, 2021 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants