-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] BlockBlobsClient.StageBlockAsync failing. #23800
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. Issue DetailsDescribe the bug When we come to commit the block list, it is failing due to an invalid block list. Expected behavior Actual behavior (include Exception or Stack Trace) The specified block list is invalid. Content: InvalidBlockList The specified block list is invalid.
RequestId:02bc8058-101e-0060-80da-a09b76000000 Headers: To Reproduce
using (var ms = new MemoryStream(File.ReadAllBytes(state.BufferFileFullName())))
}
await state.BlobClient.CommitBlockListAsync(_blockList, new BlobHttpHeaders() { ContentType = "audio/wav" }, cancellationToken: CancellationToken.None).ConfigureAwait(false); Environment:
|
@wade-dp there are 2 questions here
Thanks |
Thanks @amishra-dev.
The specified block list is invalid. Content: InvalidBlockList The specified block list is invalid.
RequestId:ae141122-e01e-005b-1389-a4ded2000000 Headers: |
I checked the logs for this blob. I think i understand what went wrong. |
Hi @wade-dp. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “ |
/unresolve Hi @amishra-dev. I have looked for where we perform a PutBlob, and it is happening as a result of a call to the 'UploadAsync' method on the .Net SDK. From what I can see in the code these calls are only made after all the blocks are committed using the 'CommitBlocksAsync' call. In the scenario I used to reproduce the problem, we committed blocks to 3 separate blobs, (2 worked) and (1 failed). The output above is for the failed case. Is it possible that the 'PutBlob' calls that you saw were for the other blobs ? |
Hey @wade-dp sorry i missed that you reactivated this. No its not possible that the SDK changes a stageblock call to putblob REST API (and i did filter the service logs for the same blob). I saw a PutBlob REST API call, which means one of the clients called an upload or similar routine triggering the other block ids to be removed. |
Describe the bug
We are using the BlockBlobClient to store WAV files.
The data for the WAV file is Staged in blocks of < 4MB using calls to 'StageBlockAsync'.
Once complete we stage another block containing the WAV header.
Finally we commit the blocks in the correct order with the header first using 'CommitBlockListAsync'.
When we come to commit the block list, it is failing due to an invalid block list.
Investigation showed that after staging 4 blocks, a call to 'GetBlockList' only returned 2 blocks.
The responses to the 'StageBlockAsync' seemed to indicate success. (Status = 201, Reason = Created)
Expected behavior
The call to 'CommitBlockListAsync' to complete successfully, without throwing an exception.
Actual behavior (include Exception or Stack Trace)
Exception thrown when trying to commit the blocks:
The specified block list is invalid.
RequestId:02bc8058-101e-0060-80da-a09b76000000
Time:2021-09-03T15:41:33.3588351Z
Status: 400 (The specified block list is invalid.)
ErrorCode: InvalidBlockList
Content:
InvalidBlockList
The specified block list is invalid.RequestId:02bc8058-101e-0060-80da-a09b76000000
Time:2021-09-03T15:41:33.3588351Z
Headers:
x-ms-request-id: 02bc8058-101e-0060-80da-a09b76000000
x-ms-client-request-id: d33f9865-baae-4c50-898d-d13f3b4b8469
x-ms-version: 2020-08-04
x-ms-error-code: InvalidBlockList
Content-Length: 221
Content-Type: application/xml
Date: Fri, 03 Sep 2021 15:41:32 GMT
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)
using (var ms = new MemoryStream(File.ReadAllBytes(state.BufferFileFullName())))
{
var blockName = state.CreateBlockListEntry();
_blocklist.Add(blockName);
}
await state.BlobClient.CommitBlockListAsync(_blockList, new BlobHttpHeaders() { ContentType = "audio/wav" }, cancellationToken: CancellationToken.None).ConfigureAwait(false);
Environment:
The text was updated successfully, but these errors were encountered: