AppendBlob - how to update content type of leased append blob #25361
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.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Storage
Storage Service (Queues, Blobs, Files)
We are using
azure-storage-blob-12.10.2
to append blobs.Requirement - Update content type of leased append blob
We found couple of limitation and issues while updating content type of append blob. We would appreciate any feedbacks on below limitations and issues. Please suggest best way to handle this issue.
Limitation
BlobClient.uploadWithResponse
have option to passBlobHttpHeaders
butAppendBlobClient.appendBlockWithResponse
doesn't have this option.Can't we have same option with
appendBlockWithResponse
method?Performance - As updating content type is not an option in
appendBlockWithResponse
method, so we have to callAppendBlobClient.setHttpHeaders(..)
which internally sends HTTP request again to update HTTPHeader.So we need to send request two time - First append blob and second update content type. As we are calling twice, so it could be performance barrier.
Do we have any possibilities to merge both functionality into one operation?
As per
BlobClientBase.setHttpHeaders
documentation - Changes a blob's HTTP header properties. if only one HTTP header is updated, the others will all be erased. In order to preserve existing values, they must be passed alongside the header being changed.With keeping above in mind,
getHtthHeaders
, so we can preserve existingHtthHeaders
and then update headers accordinglyPlease suggest your thought on this.
Issue
BlobHttpHeaders
, that's why we are gettingLeaseIdMissing
error. Please find below error stacktraceSample Code - AppendBlobLease
Error Logs
Setup (please complete the following information if applicable):
OS: window
IDE : eclipse based
Version of the Library used:
azure-storage-blob-12.10.2
The text was updated successfully, but these errors were encountered: