Skip to content

Commit 957903c

Browse files
[Storage] Added connection pool note to max_concurrency kwarg for upload/download APIs (Azure#38254)
1 parent 9c40f03 commit 957903c

File tree

6 files changed

+38
-12
lines changed

6 files changed

+38
-12
lines changed

sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,9 @@ def upload_blob(
540540
value specified in this header, the request will fail with
541541
MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).
542542
:keyword int max_concurrency:
543-
Maximum number of parallel connections to use when the blob size exceeds
544-
64MB.
543+
Maximum number of parallel connections to use when transferring the blob in chunks.
544+
This option does not affect the underlying connection pool, and may
545+
require a separate configuration of the connection pool.
545546
:keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
546547
Encrypts the data on the service-side with the given key.
547548
Use of customer-provided keys must be done over HTTPS.
@@ -695,7 +696,9 @@ def download_blob(
695696
As the encryption key itself is provided in the request,
696697
a secure connection must be established to transfer the key.
697698
:keyword int max_concurrency:
698-
The number of parallel connections with which to download.
699+
Maximum number of parallel connections to use when transferring the blob in chunks.
700+
This option does not affect the underlying connection pool, and may
701+
require a separate configuration of the connection pool.
699702
:keyword Optional[str] encoding:
700703
Encoding to decode the downloaded bytes. Default is None, i.e. no decoding.
701704
:keyword progress_hook:

sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,9 @@ async def upload_blob(
530530
value specified in this header, the request will fail with
531531
MaxBlobSizeConditionNotMet error (HTTP status code 412 - Precondition Failed).
532532
:keyword int max_concurrency:
533-
Maximum number of parallel connections to use when the blob size exceeds
534-
64MB.
533+
Maximum number of parallel connections to use when transferring the blob in chunks.
534+
This option does not affect the underlying connection pool, and may
535+
require a separate configuration of the connection pool.
535536
:keyword ~azure.storage.blob.CustomerProvidedEncryptionKey cpk:
536537
Encrypts the data on the service-side with the given key.
537538
Use of customer-provided keys must be done over HTTPS.
@@ -687,7 +688,9 @@ async def download_blob(
687688
As the encryption key itself is provided in the request,
688689
a secure connection must be established to transfer the key.
689690
:keyword int max_concurrency:
690-
The number of parallel connections with which to download.
691+
Maximum number of parallel connections to use when transferring the blob in chunks.
692+
This option does not affect the underlying connection pool, and may
693+
require a separate configuration of the connection pool.
691694
:keyword str encoding:
692695
Encoding to decode the downloaded bytes. Default is None, i.e. no decoding.
693696
:keyword progress_hook:

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,10 @@ def upload_data(
493493
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
494494
#other-client--per-operation-configuration>`_. This method may make multiple calls to the service and
495495
the timeout will apply to each call individually.
496+
:keyword int max_concurrency:
497+
Maximum number of parallel connections to use when transferring the file in chunks.
498+
This option does not affect the underlying connection pool, and may
499+
require a separate configuration of the connection pool.
496500
:keyword int chunk_size:
497501
The maximum chunk size for uploading a file in chunks.
498502
Defaults to 100*1024*1024, or 100MB.
@@ -775,7 +779,9 @@ def download_file(self, offset=None, length=None, **kwargs):
775779
Use of customer-provided keys must be done over HTTPS.
776780
Required if the file was created with a Customer-Provided Key.
777781
:keyword int max_concurrency:
778-
The number of parallel connections with which to download.
782+
Maximum number of parallel connections to use when transferring the file in chunks.
783+
This option does not affect the underlying connection pool, and may
784+
require a separate configuration of the connection pool.
779785
:keyword int timeout:
780786
Sets the server-side timeout for the operation in seconds. For more details see
781787
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,10 @@ async def upload_data(
406406
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-datalake
407407
#other-client--per-operation-configuration>`_. This method may make multiple calls to the service and
408408
the timeout will apply to each call individually.
409+
:keyword int max_concurrency:
410+
Maximum number of parallel connections to use when transferring the file in chunks.
411+
This option does not affect the underlying connection pool, and may
412+
require a separate configuration of the connection pool.
409413
:keyword int chunk_size:
410414
The maximum chunk size for uploading a file in chunks.
411415
Defaults to 100*1024*1024, or 100MB.
@@ -623,7 +627,9 @@ async def download_file(self, offset=None, length=None, **kwargs):
623627
Use of customer-provided keys must be done over HTTPS.
624628
Required if the file was created with a Customer-Provided Key.
625629
:keyword int max_concurrency:
626-
The number of parallel connections with which to download.
630+
Maximum number of parallel connections to use when transferring the file in chunks.
631+
This option does not affect the underlying connection pool, and may
632+
require a separate configuration of the connection pool.
627633
:keyword int timeout:
628634
Sets the server-side timeout for the operation in seconds. For more details see
629635
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.

sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,9 @@ def upload_file(
535535
already validate. Note that this MD5 hash is not stored with the
536536
file.
537537
:keyword int max_concurrency:
538-
Maximum number of parallel connections to use.
538+
Maximum number of parallel connections to use when transferring the file in chunks.
539+
This option does not affect the underlying connection pool, and may
540+
require a separate configuration of the connection pool.
539541
:keyword lease:
540542
Required if the file has an active lease. Value can be a ShareLeaseClient object
541543
or the lease ID as a string.
@@ -805,7 +807,9 @@ def download_file(
805807
Number of bytes to read from the stream. This is optional, but
806808
should be supplied for optimal performance.
807809
:keyword int max_concurrency:
808-
Maximum number of parallel connections to use.
810+
Maximum number of parallel connections to use when transferring the file in chunks.
811+
This option does not affect the underlying connection pool, and may
812+
require a separate configuration of the connection pool.
809813
:keyword bool validate_content:
810814
If true, calculates an MD5 hash for each chunk of the file. The storage
811815
service checks the hash of the content that has arrived with the hash

sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,9 @@ async def upload_file(
532532
already validate. Note that this MD5 hash is not stored with the
533533
file.
534534
:keyword int max_concurrency:
535-
Maximum number of parallel connections to use.
535+
Maximum number of parallel connections to use when transferring the file in chunks.
536+
This option does not affect the underlying connection pool, and may
537+
require a separate configuration of the connection pool.
536538
:keyword str encoding:
537539
Defaults to UTF-8.
538540
:keyword lease:
@@ -804,7 +806,9 @@ async def download_file(
804806
Number of bytes to read from the stream. This is optional, but
805807
should be supplied for optimal performance.
806808
:keyword int max_concurrency:
807-
Maximum number of parallel connections to use.
809+
Maximum number of parallel connections to use when transferring the file in chunks.
810+
This option does not affect the underlying connection pool, and may
811+
require a separate configuration of the connection pool.
808812
:keyword bool validate_content:
809813
If true, calculates an MD5 hash for each chunk of the file. The storage
810814
service checks the hash of the content that has arrived with the hash

0 commit comments

Comments
 (0)