Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Expose Download Metadata for Every Chunk #73
Expose Download Metadata for Every Chunk #73
Changes from 41 commits
32740b0
636588a
5de8eaa
0301f54
4ee9731
f606607
c2ab91a
868a45c
c9c8552
5636926
24074d1
e14e80b
e339417
0de1530
e824e23
abafe4e
ea2ce9c
f1cc638
db9bd42
ee59055
49a681a
b3bf149
d386e1d
67f9b53
e92aab6
e812a9d
07d7e9a
e8da53c
8b19402
6315920
43d1b43
aa22e50
0fe2fac
b04c4d4
bb837fc
6481cd9
947501a
60cbcdc
ba32f03
bb43ed2
dcd6013
6ec3a3f
bf99d44
eeaf1c3
49cd55d
566a50e
06fc9cb
0246b9c
6376db1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
No need to make the module public, just export it:
This makes the type visible to users via the path
aws_s3_transfer_manager::io::AggregatedBytes
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, updated.
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.
Again we probably don't want to expose all of the various modules and instead curate a public API that is more thought out (e.g. via
pub use
).Our other operations define an
output
module with the output type(s) of the operation. Both chunk and object metadata are output/response types so perhaps that makes sense here for consistency?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.
I have updated it to
pub use
. Initially, I started with renamingbody
tooutput
to keep it consistent but later reverted that asbody
made more sense thanoutput
. We can revisit this later.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.
Just for consistency, even if we rename
.initiate
in a future PR.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, I did update the docs for download but missed it here. I have updated it.
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.
Pretty neat, delegating async-related preparatory steps (like acquiring permit) to a separate task so
orchestrate
can return early.tasks
needs to be inArc
because of that, but feels like that's a necessary change.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.
why are we ignoring the result here? If we never expect this to fail it should be used with an
expect
so that if we ever do violate the assumptions we're making it fails loudly.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 will only fail if we have already dropped the handle at this point. The discovery task is a join handle and would be in detached state. While it’s possible for this to fail, we should not panic on it. We can handle the cancellation gracefully once we implement the cancellation logic for downloads. @ysaito1001, What are your thoughts since you are looking into cancellation?
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.
Glad you asked. I'd say don't worry about using
_
at line 121 in this PR, so no action needed. My next PR of cancelling download(s) should be a good place to handle the error properly.