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

Parallel prepare - open file on needed #355

Merged
merged 60 commits into from
Oct 16, 2023
Merged

Parallel prepare - open file on needed #355

merged 60 commits into from
Oct 16, 2023

Conversation

TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented Oct 5, 2023

Parallel preparation, the parallel stream will open the file when reading from it and seek to the right offset to read, and close the file after reading.

We checked it has no performance impact with mmap impl, and it's simpler. Simpler is better

With this approach, the user of the parallel input stream will have to manage the threads and concurrence, but it's only used by our s3 client, which already handles the concurrence and thread pool, we are good.

Original: #353

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2023

Codecov Report

Merging #355 (68aa652) into main (76c6d9f) will decrease coverage by 0.01%.
The diff coverage is 93.54%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #355      +/-   ##
==========================================
- Coverage   89.59%   89.58%   -0.01%     
==========================================
  Files          17       18       +1     
  Lines        4929     4982      +53     
==========================================
+ Hits         4416     4463      +47     
- Misses        513      519       +6     
Files Coverage Δ
source/s3.c 96.15% <ø> (ø)
source/s3_auto_ranged_put.c 92.10% <100.00%> (-0.05%) ⬇️
source/s3_default_meta_request.c 94.63% <100.00%> (+0.03%) ⬆️
source/s3_meta_request.c 92.83% <100.00%> (+0.07%) ⬆️
source/s3_request_messages.c 73.75% <ø> (-1.02%) ⬇️
source/s3_parallel_input_stream.c 89.28% <89.28%> (ø)

@TingDaoK TingDaoK marked this pull request as ready for review October 6, 2023 18:22
@TingDaoK TingDaoK changed the title Para pre rcbc Parallel prepare - open file on needed Oct 6, 2023
include/aws/s3/private/s3_meta_request_impl.h Outdated Show resolved Hide resolved
Comment on lines 159 to 161
/* Event loop to schedule IO work related on and requires to be serial, ie, reading from non-parallel streams,
* streaming parts back to the caller, etc... After the meta request is finished, this will be reset along with the
* client reference.*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trivial: revert
I don't know what this edit is trying to say

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to edit because for preparation in parallel now happens across different eventloops, instead of the only one assigned with the request.

include/aws/s3/private/s3_parallel_input_stream.h Outdated Show resolved Hide resolved
include/aws/s3/private/s3_parallel_input_stream.h Outdated Show resolved Hide resolved
source/s3_parallel_input_stream.c Outdated Show resolved Hide resolved
source/s3_parallel_input_stream.c Outdated Show resolved Hide resolved
source/s3_parallel_input_stream.c Outdated Show resolved Hide resolved
source/s3_parallel_input_stream.c Outdated Show resolved Hide resolved
source/s3_parallel_input_stream.c Outdated Show resolved Hide resolved
source/s3_parallel_input_stream.c Outdated Show resolved Hide resolved
include/aws/s3/private/s3_parallel_input_stream.h Outdated Show resolved Hide resolved
include/aws/s3/private/s3_parallel_input_stream.h Outdated Show resolved Hide resolved
source/s3_auto_ranged_put.c Outdated Show resolved Hide resolved
source/s3_parallel_input_stream.c Outdated Show resolved Hide resolved
source/s3_meta_request.c Outdated Show resolved Hide resolved
source/s3_meta_request.c Outdated Show resolved Hide resolved
source/s3_meta_request.c Outdated Show resolved Hide resolved
source/s3_meta_request.c Show resolved Hide resolved
tests/s3_tester.c Show resolved Hide resolved
@TingDaoK TingDaoK merged commit 0f751ea into main Oct 16, 2023
@TingDaoK TingDaoK deleted the para-pre-rcbc branch October 16, 2023 21:16
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