I have a mass upload system that I would like to do the following:
- Upload a chunk of data to a server that will put it as an uncommitted block on a block blob.
- The uploader cannot know anything about the block/blob implementation. It just knows it's storing a chunk of data.
- The server cannot preserve any state between calls either.
- Once all the chunks have been uploaded (the uploader sets a flag on the last chunk), the server will:
- get the list of uncommitted blocks on the blob (remember, it cannot preserve state, so it can't keep this list in memory) and then
- make a call to commit them (PutBlockList). They have to be committed in the proper order.
But the order of the blocks returned from the API is not the order that the documentation says it will be.
According to the Azure storage API site,
The list of uncommitted blocks is returned beginning with the most recently uploaded block to the oldest uploaded block. (https://msdn.microsoft.com/en-us/library/azure/dd179400.aspx , under the Remarks section at the bottom)
However, raw API calls and also the Microsoft Azure Storage SDK are both returning the blocks in alphabetical order, not in the order they were uploaded in any way.
Am I reading the documentation wrong? Could this be a bug in the API? The local storage emulator is also giving the same results.
Thanks!