-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Storage: Fix slow download performance #5791
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5791 +/- ##
=========================================
Coverage ? 46.51%
Complexity ? 25648
=========================================
Files ? 2456
Lines ? 267497
Branches ? 29751
=========================================
Hits ? 124415
Misses ? 133039
Partials ? 10043
Continue to review full report at Codecov.
|
|
@JesseLovelace @frankyn can you please review? |
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.
Apologies for the delay, I didn't click submit.
| * @param outputStream | ||
| */ | ||
| public void downloadTo(OutputStream outputStream) { | ||
| downloadTo(outputStream, new BlobSourceOption[0]); |
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.
This overloaded method doesn't look necessary. My varargs are rusty but if no Options are specified in downloadTo(OutputStream os, Options..) it should still work.
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.
yes its not needed. removed it.
| private static final String BASE64_KEY = "JVzfVl8NLD9FjedFuStegjRfES5ll5zc59CIXw572OA="; | ||
| < 8000 td data-line-number="136" class="blob-num blob-num-context"> | private static final Key KEY = | |
| new SecretKeySpec(BaseEncoding.base64().decode(BASE64_KEY), "AES256"); | ||
| private static final RetrySettings RETRY_SETTINGS = |
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's heavy retry settings in the tests. Is this by design and how do they help?
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.
updated retry settings needed for test.
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 @ajaaym, I've have two more nits. Mainly, I'd like to see documentation in comments near the unit tests exercising downloadTo().
| import org.junit.After; | ||
| import org.junit.Before; | ||
| import org.junit.Test; | ||
| import org.threeten.bp.Duration; |
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 a necessary import. It looks unused.
| RetrySettings.newBuilder() | ||
| .setMaxAttempts(2) | ||
| .build(); | ||
| private static final ApiClock API_CLOCK = |
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.
Please document how retries are being exercised in these unit tests. It will help for posterity.
|
cc: @jadekler, he wants to use the overload |
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.
Pending tests passing.
|
Thanks for your patience @ajaaym! |
Fixes #3929 Updated blob to download using direct download method