Skip to content
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

[page-blob] introduce IfMatch header to put request #1850

Open
wants to merge 1 commit into
base: legacy
Choose a base branch
from

Conversation

goksgie
Copy link

@goksgie goksgie commented Oct 14, 2024

The Azure Docs do not mention, but we can prevent accidental overwrites to Azure Page Blobs when two parties issue a create request. This can be prevented through IfMatch headers, as this commit introduces.

As of today, the only alternative option to prevent overwrite would be managing an internal blob service, or checking whether it exists before issuing a create request (which introduces an additional round-trip).

For C# equivalent, please see: https://github.com/Azure/azure-sdk-for-net/blob/fb0b80d4c8fc99e9e964862f2a374d2bc28096f7/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs#L844

The Azure Docs do not mention, but we can prevent accidental overwrites
to Azure Page Blobs when two parties issue a create request. This can be
prevented through IfMatch headers, as this commit introduces.

For C# equivelant, please see: https://github.com/Azure/azure-sdk-for-net/blob/fb0b80d4c8fc99e9e964862f2a374d2bc28096f7/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs#L844
@goksgie
Copy link
Author

goksgie commented Oct 14, 2024

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main branch is unsupported and should not be used in production. You might want to check if this is already implemented in the feature/track2 branch or retarget there if not.

@goksgie
Copy link
Author

goksgie commented Oct 14, 2024

hey @heaths , thanks for quick response. I don't see any code under storage directory in the branch you've suggested. I assume that is still under development.

But, please redirect me otherwise. Thanks!

@heaths
Copy link
Member

heaths commented Oct 14, 2024

The storage team is working on a new crate. Keep in mind what's under main right now is unsupported.

@heaths heaths changed the base branch from main to legacy October 16, 2024 23:33
@heaths
Copy link
Member

heaths commented Oct 16, 2024

main branch has been moved to legacy. Retargeting some old PRs.

@goksgie
Copy link
Author

goksgie commented Oct 20, 2024

@heaths , would it be possible to merge this to "legacy" branch? We'll possibly use cargo syntax to consume this specific change to simplify the code until we acquire more clarity around official Azure Storage SDK.

@heaths
Copy link
Member

heaths commented Oct 21, 2024

@goksgie you already can without me merging it. Just point to your topic branch. Even if I did merge it, we have no plans for further releases from the legacy branch at this time i.e., it won't be on crates.io and you'd have to reference a commit anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants