Fix Infinite Retry Loop in loading RepositoryData#50987
Merged
original-brownbear merged 3 commits intoelastic:masterfrom Jan 16, 2020
original-brownbear:fix-broken-repo-retry
Merged
Fix Infinite Retry Loop in loading RepositoryData#50987original-brownbear merged 3 commits intoelastic:masterfrom original-brownbear:fix-broken-repo-retry
original-brownbear merged 3 commits intoelastic:masterfrom
original-brownbear:fix-broken-repo-retry
Conversation
We were running into an infinite loop when trying to load corrupted (or otherwise un-loadable) repository data for a repo that uses best effort consistency (e.g. that was just freshly mounted as done in the test) because we kepy resetting to `-1` on `IOException`, listing and finding the broken generation `N` and then interpreted the subsequent reset to `-1` as a concurrent change to the repository.
Collaborator
|
Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore) |
| generation = latestIndexBlobId(); | ||
| } catch (IOException ioe) { | ||
| throw new RepositoryException(metadata.name(), "Could not determine repository generation from root blobs", ioe); | ||
| listener.onFailure( |
Contributor
Author
There was a problem hiding this comment.
Fixed these spots because a.) it's just the right thing to not mix listener and throwing :) but also so that the exception properly bubbles up the listener chain in the test infrastructure that has to run this method off the test thread (because we assert that it only runs on the generic or snapshot pool)
Contributor
Author
|
Thanks Tanguy! |
This was referenced Jan 16, 2020
original-brownbear
added a commit
that referenced
this pull request
Jan 16, 2020
* Fix Infinite Retry Loop in loading RepositoryData We were running into an infinite loop when trying to load corrupted (or otherwise un-loadable) repository data for a repo that uses best effort consistency (e.g. that was just freshly mounted as done in the test) because we kepy resetting to `-1` on `IOException`, listing and finding the broken generation `N` and then interpreted the subsequent reset to `-1` as a concurrent change to the repository.
original-brownbear
added a commit
that referenced
this pull request
Jan 16, 2020
* Fix Infinite Retry Loop in loading RepositoryData We were running into an infinite loop when trying to load corrupted (or otherwise un-loadable) repository data for a repo that uses best effort consistency (e.g. that was just freshly mounted as done in the test) because we kepy resetting to `-1` on `IOException`, listing and finding the broken generation `N` and then interpreted the subsequent reset to `-1` as a concurrent change to the repository.
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
* Fix Infinite Retry Loop in loading RepositoryData We were running into an infinite loop when trying to load corrupted (or otherwise un-loadable) repository data for a repo that uses best effort consistency (e.g. that was just freshly mounted as done in the test) because we kepy resetting to `-1` on `IOException`, listing and finding the broken generation `N` and then interpreted the subsequent reset to `-1` as a concurrent change to the repository.
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.
We were running into an infinite loop when trying to load corrupted (or otherwise un-loadable)
repository data for a repo that uses best effort consistency (e.g. that was just freshly mounted
as done in the test) because we kepy resetting to
-1onIOException, listing and finding the brokengeneration
Nand then interpreted the subsequent reset to-1as a concurrent change to the repository.Non issue because this hasn't been released yet but serious issue otherwise.
Without this fix, any issue that leads to an
index-Nbeing listed but not readable results in an infinite retry loop when loading repository data.cc @albertzaharovits