-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Cleanup Concurrent RepositoryData Loading #48329
Changes from 3 commits
43c98cf
4171652
3c5d0d9
6692fd9
2524515
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -902,9 +902,6 @@ public void endVerification(String seed) { | |
public RepositoryData getRepositoryData() { | ||
try { | ||
return getRepositoryData(latestIndexBlobId()); | ||
} catch (NoSuchFileException ex) { | ||
// repository doesn't have an index blob, its a new blank repo | ||
return RepositoryData.EMPTY; | ||
} catch (IOException ioe) { | ||
throw new RepositoryException(metadata.name(), "Could not determine repository generation from root blobs", ioe); | ||
} | ||
|
@@ -925,9 +922,6 @@ private RepositoryData getRepositoryData(long indexGen) { | |
repositoryData = RepositoryData.snapshotsFromXContent(parser, indexGen); | ||
} | ||
return repositoryData; | ||
} catch (NoSuchFileException ex) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: while we are at it, there are unneeded There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't find it right now, but others disagreed with removing the |
||
// repository doesn't have an index blob, its a new blank repo | ||
return RepositoryData.EMPTY; | ||
} catch (IOException ioe) { | ||
throw new RepositoryException(metadata.name(), "could not read repository data from index blob", ioe); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no good reason to catch here or below. We break out on generation
-1
and return empty data so whenever we fail to find data for gen.>= 0
it's a problem and we mustn't ignore it.