-
Notifications
You must be signed in to change notification settings - Fork 13
Read retry bug fix #400
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
Read retry bug fix #400
Conversation
…ject retry logic from retrying.
…rs to use instead of catching an exception when a read job fails.
| final Collection<String> objectNames) | ||
| throws IOException | ||
| { | ||
| final Map<String, Long> objectSizeMap = new HashMap<>(); |
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.
Is this map going to be mutated? If not convert this to an ImmutableMap and use the ImmutableMap.Builder to create it.
|
|
||
| long requiredSpace = 0; | ||
| long availableSpace = 0; | ||
| final IOException ioException = null; |
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.
Is this purposefully alway null?
| helpers.ensureBucketExists(bucketName); | ||
| } catch (final IOException e) { | ||
| return new ObjectStorageSpaceVerificationResult(ObjectStorageSpaceVerificationResult.VerificationStatus.BucketDoesNotExist, | ||
| requiredSpace, availableSpace, ioException); |
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.
Is e supposed to be passed in instead of ioException
|
|
||
| import java.io.IOException; | ||
|
|
||
| public class UnrecoverableIOException extends IOException { |
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.
Add an explanation of what an unrecoverable IO Exception is.
This addresses https://jira.spectralogic.com/browse/JSDK-185.
There are 2 parts:
Read jobs are refactored so that failures in writing a file short-circuit the read retry logic and bubble an exception back to the client.
Implements a helper function that allows customer to see if the objects they want to get from a BP bucket will fit in a directory they tell us about, instead of relying on catching an exception during the read.