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

BlobLeaseClient Avoid Log 409 response #33695

Merged
merged 23 commits into from
Mar 1, 2023

Conversation

jaschrep-msft
Copy link
Member

@jaschrep-msft jaschrep-msft commented Jan 26, 2023

When attempting to acquire a lease on a blob or container where one already exists, the service returns a 409. An application may wish to consider this attempt as part of the normal flow of operation and schedule a retry at a later time, rather than consider it an error upfront and log it as such.

Error suppression on this operation is necessary to address #21511.

This introduces an overload to AcquireLease() that accepts a ResponseClassifier that can use a predicate to determine whether a response should be let through as a non-error. The mentioned issue can then construct the appropriate predicate for its scenario.

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Jan 26, 2023
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

Azure.Storage.Blobs

@jaschrep-msft jaschrep-msft marked this pull request as ready for review February 2, 2023 15:41
Copy link
Member

@tg-msft tg-msft left a comment

Choose a reason for hiding this comment

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

Looks great - I'm really happy we're making this change.

sdk/storage/Azure.Storage.Blobs/src/BlobLeaseClient.cs Outdated Show resolved Hide resolved
@jaschrep-msft jaschrep-msft merged commit 8078c11 into Azure:main Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants