-
Notifications
You must be signed in to change notification settings - Fork 77
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: retry using remote offset #604
Conversation
expect(storageRpcMock.writeWithResponse( | ||
eq(UPLOAD_ID), | ||
capture(capturedBuffer), | ||
eq(0), | ||
eq(0L), | ||
eq(MIN_CHUNK_SIZE), | ||
eq(false))).andThrow(exception); | ||
expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(0L); | ||
expect(storageRpcMock.writeWithResponse( | ||
eq(UPLOAD_ID), | ||
capture(capturedBuffer), | ||
eq(0), | ||
eq(0L), | ||
eq(MIN_CHUNK_SIZE), |
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.
expect(storageRpcMock.writeWithResponse( | |
eq(UPLOAD_ID), | |
capture(capturedBuffer), | |
eq(0), | |
eq(0L), | |
eq(MIN_CHUNK_SIZE), | |
eq(false))).andThrow(exception); | |
expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(0L); | |
expect(storageRpcMock.writeWithResponse( | |
eq(UPLOAD_ID), | |
capture(capturedBuffer), | |
eq(0), | |
eq(0L), | |
eq(MIN_CHUNK_SIZE), | |
expect( | |
storageRpcMock.writeWithResponse( | |
eq(UPLOAD_ID), | |
capture(capturedBuffer), | |
eq(0), | |
eq(0L), | |
eq(MIN_CHUNK_SIZE), | |
eq(false))) | |
.andThrow(exception); | |
expect( | |
storageRpcMock.writeWithResponse( | |
eq(UPLOAD_ID), | |
capture(capturedBuffer), | |
eq(0), | |
eq(0L), | |
eq(MIN_CHUNK_SIZE), | |
eq(false))) | |
.andReturn(null); |
expect(storageRpcMock.writeWithResponse( | ||
eq(UPLOAD_ID), | ||
capture(capturedBuffer), | ||
eq(0), | ||
eq(0L), | ||
eq(MIN_CHUNK_SIZE), | ||
eq(false))).andThrow(exception); | ||
expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(10L); | ||
expect(storageRpcMock.writeWithResponse( | ||
eq(UPLOAD_ID), | ||
capture(capturedBuffer), | ||
eq(10), | ||
eq(10L), | ||
eq(MIN_CHUNK_SIZE - 10), |
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.
expect(storageRpcMock.writeWithResponse( | |
eq(UPLOAD_ID), | |
capture(capturedBuffer), | |
eq(0), | |
eq(0L), | |
eq(MIN_CHUNK_SIZE), | |
eq(false))).andThrow(exception); | |
expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(10L); | |
expect(storageRpcMock.writeWithResponse( | |
eq(UPLOAD_ID), | |
capture(capturedBuffer), | |
eq(10), | |
eq(10L), | |
eq(MIN_CHUNK_SIZE - 10), | |
expect( | |
storageRpcMock.writeWithResponse( | |
eq(UPLOAD_ID), | |
capture(capturedBuffer), | |
eq(0), | |
eq(0L), | |
eq(MIN_CHUNK_SIZE), | |
eq(false))) | |
.andThrow(exception); | |
expect( | |
storageRpcMock.writeWithResponse( | |
eq(UPLOAD_ID), | |
capture(capturedBuffer), | |
eq(10), | |
eq(10L), | |
eq(MIN_CHUNK_SIZE - 10), | |
eq(false))) | |
.andReturn(null); |
Codecov Report
@@ Coverage Diff @@
## master #604 +/- ##
============================================
- Coverage 64.68% 64.32% -0.36%
+ Complexity 629 621 -8
============================================
Files 32 32
Lines 5255 5317 +62
Branches 510 520 +10
============================================
+ Hits 3399 3420 +21
- Misses 1697 1735 +38
- Partials 159 162 +3
Continue to review full report at Codecov.
|
The coverage miss seems to be due to getCurrentUploadOffset in HttpStorageRpc not being tested. This is part of way bigger issue, that entire file doesn't seem to have any coverage. I'm going to go ahead and merge this as is and it should be a follow up issue to get coverage for HttpStorageRpc |
I suspect, this fix did not go so well. I am now getting following exceptions sometimes:
I think, at very least we should have a better error message. I use version 1.113.4. I'll try to go back to 1.113.3 and see how it goes. Thank you. |
Thanks for letting us know, @wildraid! Could you share a snippet of code that you used which caused this error? |
@wildraid released a new version with a fix for the issue you raised. Thanks for calling it out! |
@frankyn , great news! Thanks for your help! |
Note: @JesseLovelace will be driving this PR to completion as I'll be OOO over the next two weeks. Thanks Jesse!
Fixes #603 ☕️