I am using append blob to store a large binary file. I've got the file in parts (every part is less than 4 MB) and append them to make it whole again. If an append operation fails during the process, are there any remains on the file from this failed append attempt? Or this append operation is atomic?
相关问题
- running headless chrome in an microsoft azure web
- Docker task in Azure devops won't accept "$(pw
- Register MicroServices in Azure Active Directory (
- Removing VHD's from Azure Resource Manager aft
- Cannot use the Knowledge academic API
相关文章
- SQL Azure Reset autoincrement
- How to cast Azure DocumentDB Document class to my
- Can't get azure web role to run locally using
- Azure WebApp - Unable to auto-detect the runtime s
- How to change region for Azure WebSite
- Azure webjob vs cloud service
- Azure data transfer Identity Column Seed Jumped by
-
Could ThreadLocal
possibly be usefu
With an
Append Blob
, as soon as you write a block to the blob it gets committed and changes the size of the blob. So in your scenario, let's say you've broken the source file in 10 parts and appending these parts. Let's further assume 1st - 4th part succeed, 5th part fails and then 6th - 10th part succeeds. In this case you will have a corrupt blob with parts 1-4 and 6-10. Because in an Append Blob, contents are always appended to the existing content of the blob, you would have no way to insert correct data for 5th part.Considering this scenario, I would not recommend using
Append Blobs
. The use case for an Append Blob is definitely not this. I would recommend usingBlock Blob
for this. With the Block Blob, you put 1st - 4th part and then 5th part fails then the whole upload operation will fail. With Block Blobs, Azure Storage keeps the uploaded yet uncommitted chunks for 14 days. So if you want to resume the upload from 5th part, you would get information about uncommitted chunks from Azure and then restart your upload from 5th part. Once the remaining parts are uploaded, you can instruct Azure to put these chunks together (using Put Block List operation) to create the blob.If the storage service returns a failure code, nothing remains from the failed attempt. This assumes 'attempt' means a single storage service call (ex append 4MB block).