Skip to content

Download Manager: Stop shutdown in case of empty download tasks Queue #641

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

Open
wants to merge 12 commits into
base: sea-migration
Choose a base branch
from

Conversation

varun-edachali-dbx
Copy link
Collaborator

@varun-edachali-dbx varun-edachali-dbx commented Jul 21, 2025

What type of PR is this?

  • Feature

Description

Currently, get_next_downloaded_file assumes that if the download queue is empty, then we're done with the manager: it shuts down and returns None. But, this is Thrift specific behaviour. In SEA, we get links in batches and just because the manager is empty now does not necessarily mean we're done downloading all of the links we require.

Thus, we change get_next_downloaded_file to block until we can actually acquire a file. It must now only be invoked when we know that there is a file to acquire. In the old Thrift CloudFetchQueue, an additional call was made to this method when we were done fetching results during next_n_rows - this has been removed to align with the above. The type of the arrow table maintained by the Queue is now strictly pyarrow.Table instead of optionally being None.

How is this tested?

  • Unit tests
  • E2E Tests
  • Manually
  • N/A

Related Tickets & Documents

N/A

Signed-off-by: varun-edachali-dbx <[email protected]>
Signed-off-by: varun-edachali-dbx <[email protected]>
Signed-off-by: varun-edachali-dbx <[email protected]>
@varun-edachali-dbx varun-edachali-dbx changed the title make download manager less defensive Download Manager: Stop shutdown in case of empty download tasks Queue Jul 21, 2025
@varun-edachali-dbx varun-edachali-dbx marked this pull request as ready for review July 21, 2025 05:38
Signed-off-by: varun-edachali-dbx <[email protected]>
Signed-off-by: varun-edachali-dbx <[email protected]>
@varun-edachali-dbx varun-edachali-dbx marked this pull request as ready for review July 21, 2025 08:07
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.

1 participant