Fix SLM check for restore in progress#50868
Merged
dakrone merged 2 commits intoelastic:masterfrom Jan 10, 2020
Merged
Conversation
This commit fixes the check in SLM where the `RestoreInProgress` metadata was checked for existence. Rather than check existence we should instead check the `isEmpty` method. Prior to this, a successful restore for a repository that used SLM retention would prevent SLM retention from running in subsequent invocations, due to SLM thinking that a restore was still running.
Collaborator
|
Pinging @elastic/es-core-features (:Core/Features/ILM+SLM) |
AthenaEryma
approved these changes
Jan 10, 2020
Contributor
AthenaEryma
left a comment
There was a problem hiding this comment.
Nasty bug. Fix LGTM.
| logger.info("--> snapshot [{}] has been deleted", snapshotName); | ||
| } catch (RepositoryException re) { | ||
| // Concurrent status calls and write operations may lead to failures in determining the current repository generation | ||
| // TODO: Remove this hack once tracking the current repository generation has been made consistent |
Contributor
There was a problem hiding this comment.
Don't need to block this PR on it, but we should check if this hack is still necessary.
dakrone
added a commit
to dakrone/elasticsearch
that referenced
this pull request
Jan 10, 2020
* Fix SLM check for restore in progress This commit fixes the check in SLM where the `RestoreInProgress` metadata was checked for existence. Rather than check existence we should instead check the `isEmpty` method. Prior to this, a successful restore for a repository that used SLM retention would prevent SLM retention from running in subsequent invocations, due to SLM thinking that a restore was still running.
dakrone
added a commit
to dakrone/elasticsearch
that referenced
this pull request
Jan 10, 2020
* Fix SLM check for restore in progress This commit fixes the check in SLM where the `RestoreInProgress` metadata was checked for existence. Rather than check existence we should instead check the `isEmpty` method. Prior to this, a successful restore for a repository that used SLM retention would prevent SLM retention from running in subsequent invocations, due to SLM thinking that a restore was still running.
dakrone
added a commit
that referenced
this pull request
Jan 10, 2020
* Fix SLM check for restore in progress (#50868) * Fix SLM check for restore in progress This commit fixes the check in SLM where the `RestoreInProgress` metadata was checked for existence. Rather than check existence we should instead check the `isEmpty` method. Prior to this, a successful restore for a repository that used SLM retention would prevent SLM retention from running in subsequent invocations, due to SLM thinking that a restore was still running. * Fix 7.x-isms
dakrone
added a commit
that referenced
this pull request
Jan 10, 2020
* Fix SLM check for restore in progress (#50868) * Fix SLM check for restore in progress This commit fixes the check in SLM where the `RestoreInProgress` metadata was checked for existence. Rather than check existence we should instead check the `isEmpty` method. Prior to this, a successful restore for a repository that used SLM retention would prevent SLM retention from running in subsequent invocations, due to SLM thinking that a restore was still running. * Fix 7.x-isms
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
* Fix SLM check for restore in progress This commit fixes the check in SLM where the `RestoreInProgress` metadata was checked for existence. Rather than check existence we should instead check the `isEmpty` method. Prior to this, a successful restore for a repository that used SLM retention would prevent SLM retention from running in subsequent invocations, due to SLM thinking that a restore was still running.
This was referenced Feb 3, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit fixes the check in SLM where the
RestoreInProgressmetadata was checked for existence. Rather than check existence we
should instead check the
isEmptymethod. Prior to this, a successfulrestore for a repository that used SLM retention would prevent SLM
retention from running in subsequent invocations, due to SLM thinking
that a restore was still running.