-
Notifications
You must be signed in to change notification settings - Fork 152
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
feat: Add multiprocessing and chunked downloading to transfer manager #1002
Conversation
54663c0
to
286f38a
Compare
5e56905
to
d7f5acf
Compare
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.
Nice! Just had a couple thoughts..
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.
It's awesome to see both process and thread workers being supported 🎉 Still making my way through the PR :) A few questions
System test is deadlocking due to grpc/grpc#31885, investigating workaround |
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.
A few questions after a second pass; otherwise LGTM, thanks!
behavior. The default is therefore to use processes instead of threads. | ||
|
||
Checksumming (md5 or crc32c) is not supported for chunked operations. Any | ||
`checksum` parameter passed in to download_kwargs will be ignored. |
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.
Good call out. Where are we ignoring the checksum
parameter?
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.
Explained this offline, but for posterity, checksum is not sent by the server for ranged reads, and chunked downloads are all ranged reads, so none of the responses include a checksum. As a result, the resumable media code silently ignores the checksum parameter.
with open(full_filename, "rb") as file_obj: | ||
assert _base64_md5hash(file_obj) == source_file["hash"] | ||
|
||
# Now test for case where last chunk is exactly 1 byte. |
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 for the thorough tests! I especially like this one; really helped check the cursor moving through the last byte.
@cojenco @danielduhh responded to feedback, PTAL. Thanks! |
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.
From a functionality standpoint this LGTM.
No description provided.