-
Notifications
You must be signed in to change notification settings - Fork 14
WIP: Fix incomplete Minio downloads when downloading many files concurrently #697
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
base: master
Are you sure you want to change the base?
Changes from all commits
52c0e47
0067e41
d037e74
9f68637
d241568
9403c1c
eda843c
038a08b
f221741
4ff7512
4ff9971
4c6adb3
7eb6ee2
c796005
443526e
1d3838c
60e11e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -691,7 +691,7 @@ async def get_signed_url( | |
| progress, | ||
| download_progress, | ||
| shorten_filename=self.configuration.shortened_downloaded_filename, # NOQA: E501 | ||
| expected_size=expected_size, | ||
| # expected_size=expected_size, | ||
| ) | ||
| ) | ||
| ) # NOQA 501 | ||
|
|
@@ -714,7 +714,13 @@ async def get_signed_url( | |
| break | ||
|
|
||
| # Now just wait until all of our tasks complete | ||
| await asyncio.gather(*download_tasks) | ||
| MAX_INFLIGHT = 100 | ||
| if len(download_tasks) >= MAX_INFLIGHT: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't we already control this via sempahore?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Number of downloads is controlled by a semaphore in the |
||
| await asyncio.gather(*download_tasks) | ||
| download_tasks.clear() | ||
|
|
||
| # print(f"Total tasks alive before gather: {len(asyncio.all_tasks())}") | ||
| # await asyncio.gather(*download_tasks) | ||
| return result_uris | ||
|
|
||
| async def as_files_async( | ||
|
|
||
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 is a magic number and might not work in general. Would it be enough to download to the
.partfile, rename, thenstatthe new file?