-
Notifications
You must be signed in to change notification settings - Fork 456
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
Check if a container or table exists before trying to create it #9555
Conversation
Is the issue you referenced for 409s talking about conflicts coming from storage operations performed by the Host (i.e. code in this repo), or by code in lower levels? I ask because most of the storage operations performed by the Host are done in the WebJobs SDK, and looking through all the CreateIfNotExistsAsync calls (e.g. here) they all seem to be using the existing pattern of just relying on the storage SDK method. So I'm wondering whether the changes made in this PR will actually address the customer issue? I.e. we're using CreateIfNotExistsAsync all over the place, down through transitive dependencies. |
src/WebJobs.Script.WebHost/Security/KeyManagement/BlobStorageSecretsRepository.cs
Show resolved
Hide resolved
That's a good point, a couple years ago we made a similar change but for the lease acquisition for a similar reason, and I think we missed the container creation flow. I think we should change this in the WebJobs SDK too if we can. I did some testing locally and this did reduce some of the 409 noise. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Issue describing the changes in this PR
Resolves multiple GH issues where customers are seeing an excessive amount of "409 The specified container already exists" errors in their logs:
CreateIfNotExistsAsync
throws an exception if the container exists. An issue was opened for this in the sdk repo but was closed unresolved. This was an intention change and not a bug (more details). However, it still does lead to excessive logs.The change may only need to happen for the blob container but figured better safe and do it for all usage of
CreateIfNotExistsAsync
.Relevant issues:
Pull request checklist
release_notes.md
Additional information
Additional PR information