[FEATURE REQ] OpenRead for BlockBlob should return properties #41697
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Storage
Storage Service (Queues, Blobs, Files)
Library name
Azure.Storage.Blobs
Please describe the feature.
There's currently 2 families of methods to download blobs
OpenRead
andDownloadStreaming
. As per #22022 , the former is better for chunked downloads (because the connection is returned to the connection pool), and the latter is better for quick usages (because the pool is held for the lifetime of the stream).Both families of methods do a
GetProperties
call as their first order of business as part of determining how to chunk the download, and potentially upon reaching the end of the stream if concurrent modifications are allowed. They also use this information for client-side encryption.This is already (in my opinion) not ideal because the initial transfer size is part of the options that are passed in, so it should be possible to start with a range download except for cases where client side encryption is enabled. Nevertheless, that's not the focus of this feature request.
The
DownloadStreaming
family of methods returns the properties it fetches as part of the object, so downstream client code can use these for whatever purposes the client may intend. TheOpenRead
family of methods doesn't.The problem with this is it leaves clients with bad options if they need to use the properties:
DownloadStreaming
, which doesn't do chunking and forces you to implement your own.Ideally,
OpenRead
would return the properties that it's fetching as it's first order of business instead, which would allow downstream clients to rely on those. Even more ideally, none of these methods would callGetProperties
unless they truly need to (for ex: in client side encryption).The text was updated successfully, but these errors were encountered: