Skip to content
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

Merged
merged 10 commits into from
Dec 12, 2023

Conversation

TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented Dec 9, 2023

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.

@TingDaoK TingDaoK changed the title Req partsize support meta request level override of part size and mpu threshold Dec 9, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2023

Codecov Report

Merging #393 (7ed55a4) into main (fcd7a10) will decrease coverage by 0.01%.
The diff coverage is 96.42%.

Additional details and impacted files

Impacted file tree graph

@@            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     
Files Coverage Δ
source/s3_util.c 99.61% <100.00%> (+<0.01%) ⬆️
source/s3_client.c 88.06% <95.83%> (+0.05%) ⬆️

... and 1 file with indirect coverage changes

@TingDaoK TingDaoK marked this pull request as ready for review December 11, 2023 19:32
Comment on lines 1255 to 1268
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);
}
Copy link
Contributor

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?

@TingDaoK TingDaoK merged commit bb6af37 into main Dec 12, 2023
30 checks passed
@TingDaoK TingDaoK deleted the req-partsize branch December 12, 2023 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants