-
Notifications
You must be signed in to change notification settings - Fork 80
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
fix: throw io exception instead of storage exception #229
Conversation
Codecov Report
@@ Coverage Diff @@
## master #229 +/- ##
============================================
- Coverage 63.67% 63.50% -0.18%
+ Complexity 548 540 -8
============================================
Files 31 30 -1
Lines 4782 4762 -20
Branches 428 427 -1
============================================
- Hits 3045 3024 -21
- Misses 1577 1578 +1
Partials 160 160
Continue to review full report at Codecov.
|
@elharo could I get your review on this PR. I want another perspective. |
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.
Still reviewing. Thanks for putiing this together @dmitry-fa
@@ -133,12 +133,12 @@ public int read(ByteBuffer byteBuffer) throws IOException { | |||
if (result.y().length > 0 && lastEtag != null && !Objects.equals(result.x(), lastEtag)) { | |||
StringBuilder messageBuilder = new StringBuilder(); | |||
messageBuilder.append("Blob ").append(blob).append(" was updated while reading"); | |||
throw new StorageException(0, messageBuilder.toString()); |
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.
I'm wondering if this will no longer be retried. Well it shouldn't be so maybe that's not an issue.
google-cloud-storage/src/main/java/com/google/cloud/storage/BlobReadChannel.java
Show resolved
Hide resolved
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.
Thanks for the prompt both, follow-up.
Let's move forward. LGTM.
Fixes #219