-
Notifications
You must be signed in to change notification settings - Fork 40
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
support meta request level override of part size and mpu threshold #393
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #393 +/- ##
==========================================
- Coverage 88.67% 88.67% -0.01%
==========================================
Files 21 21
Lines 5945 5962 +17
==========================================
+ Hits 5272 5287 +15
- Misses 673 675 +2
|
source/s3_client.c
Outdated
size_t adjusted_part_size = part_size_config; | ||
uint32_t num_parts = 0; | ||
if (content_length_found) { | ||
if (aws_s3_calculate_optimal_mpu_part_size_and_num_parts( | ||
content_length, client_part_size, client_max_part_size, &part_size, &num_parts)) { | ||
content_length, part_size_config, client_max_part_size, &adjusted_part_size, &num_parts)) { | ||
return NULL; | ||
} | ||
} | ||
if (adjusted_part_size != part_size_config) { | ||
AWS_LOGF_DEBUG( | ||
AWS_LS_S3_META_REQUEST, | ||
"The multipart upload part size has been adjusted to %" PRIu64 "", | ||
(uint64_t)adjusted_part_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.
trivial: I would move this logic up before we set multipart_upload_threshold. Then, if part-size gets adjusted, the multipart_upload_threshold will also be adjusted.
Also, not sure it's worth the potential confusion of having 2 part_size_config
and adjusted_part_size
variables? Maybe just have 1 part_size
variable that we update as the function progresses?
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.