简体   繁体   中英

Order of blobs when using DownloadBlockList in Azure blob storage

I am implementing a service that is supposed to save chunks of data passed into it to Azure as BlockBlob. To be able to append my chunks as blocks to existing BlockBlob I call DownloadBlockList to get the list of those chunks that have already been added and add new one at the end before using PostBlockList.

The question is - does azure .net library guarantee that the order of the list that is returned by DownloadBlockList is constant and corresponds to the order I've been adding those blocks?

Based on my quick tests this assumption is correct, but I couldn't find any official confirmation for that behaviour in documentation.

From Get Block List REST API Documentation :

The list of committed blocks is returned in the same order that they were committed by the Put Block List operation. No block may appear more than once in the committed block list.

Since .Net SDK is simply a wrapper around the REST API, I would say your assumption is correct. It returns the block list that was committed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM