Skip to content

Conversation

@andrewsg
Copy link
Contributor

@andrewsg andrewsg commented Dec 6, 2022

This PR adds a "transfer_manager" module which enables concurrent downloads and uploads of multiple files via the use of a thread pool. Transfer Manager is a preview feature and the API and behavior are subject to change before a GA launch of the feature in the future. A warning is emitted on import to this effect. Please do not hesitate to submit bugs and general feedback, positive or negative, by opening a github issue.

The performance of this feature is sensitive to the value of the "threads" parameter and the specifics of the environment and workload. Read the docstrings on "threads" and experiment to find what works best for each use case.

@andrewsg andrewsg requested review from a team as code owners December 6, 2022 19:44
@andrewsg andrewsg requested a review from dandhlee December 6, 2022 19:44
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: storage Issues related to the googleapis/python-storage API. labels Dec 6, 2022
@andrewsg andrewsg changed the title feat: Add "transfer_manager" module preview feature feat: Add "transfer_manager" module for concurrent uploads and downloads, as a preview feature Dec 6, 2022
Copy link
Contributor

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

Just a nit; thanks for addressing the comments from yesterday's discussion.

# limitations under the License.


def upload_many_blobs_with_transfer_manager(
Copy link
Contributor

Choose a reason for hiding this comment

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

After this PR / release can you split these samples into respective files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

from google.api_core import exceptions


def test_upload_many(shared_bucket, file_data, blobs_to_delete):
Copy link
Contributor

Choose a reason for hiding this comment

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

In a subsequent PR please add a file object of 16mib range so it tests resumable upload code path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/python-storage API. size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants