-
Notifications
You must be signed in to change notification settings - Fork 2k
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
AzureBlobStorage Etag bug? #6908
Comments
Enough people have been tripped up by this that I think some change needs to happen. What you're suggesting sounds good to me. The code for The Azure Storage SDK source code uses that same condition when |
dotnet#6908 adjust ETag options on Clear/Write
Fixed by #7187 |
#3516 is related to this.
In the AzureBlobStorage, there is some inconsitency with Etags. In the WriteStateAsync, the BlobRequestConditions are set to this
new BlobRequestConditions { IfMatch = grainState.ETag != null ? new ETag(grainState.ETag) : (ETag?)null },
which I believe is correct (if Etag on what we're writing is null, don't have to match, overwrite anyway).
However in ClearStateAsync the code is this:
blob.DeleteIfExistsAsync(DeleteSnapshotsOption.None, conditions: new BlobRequestConditions { IfMatch = new ETag(grainState.ETag) })
which fails with a BlobRequestConditions not met exception. I believe the condition should match that in Write.
If @ReubenBond concurs, happy to submit a PR (which would also correct a copy and paste error in some of the logging)
The text was updated successfully, but these errors were encountered: