Comments (3)
I've tried to track the logic in the .net SDK. but it's pretty hard to figure it out because it's very fragmented.
I think that it boils down to this:
and this for the failure case:
https://github.com/Azure/azure-sdk-for-net/blob/c4418cd3e85f2e01a92b702414244647ff3695df/sdk/core/Azure.Core/src/Shared/OperationInternal.cs#L237C12-L237C91
but I don't see any code that would not consider a 500 a terminal failure.
from azure-sdk-for-go.
I think the problem here is that we've conflated rules for retry with status codes we consider to be terminal failure. Off the cuff, what probably needs to happen is that for status codes that aren't terminal success, we let them be handled by the retry policy which, by default, will enforce a retry cap (need to experiment with this). We just have to ensure that we don't consider the underlying poller to be "done" in such cases.
from azure-sdk-for-go.
Ok it's more nuanced than that. For context, Poller[T].PollUntilDone()
will exit IFF one of the following conditions is met.
- the HTTP transport fails (governed by the retry policy)
- the underlying poller reaches a terminal state
- the context expires/is canceled
Here is the sequence of events. This assumes the default retry policy is in play.
PollUntilDone
calls underlyingpoller.Poll
Poll
creates the request and sends it through the pipeline- Service returns 500, the retry policy retries the request until the cap is hit
- 500 is returned to the underlying poller which is non-terminal
- goto step 1
While we could augment the retry policy to tell PollUntilDone
"my retry cap has been exceeded", it would tightly couple the two together which is not good (e.g. if the in-box retry policy has been replaced, now the logic is broken).
This might require updating PollUntilDone
to exit after N number of transient status codes. This requires some care though as it will multiply with the number of retries from the retry policy. i.e. if the retry policy retries three times on 500, and PollUntilDone
retries three times on 500, the total number of requests will be nine (with exponential back-off from the retry policy to boot).
from azure-sdk-for-go.
Related Issues (20)
- Support update container registry cache rule source repository and target repository HOT 2
- [Question] How does token Caching work HOT 5
- [azeventhubs] NextPartitionClient does not always respect context cancellation HOT 3
- [azcosmos] 1.0.3 - The provided cross partition query can not be directly served by the gateway HOT 4
- Question: How can I count the number of blobs in a storage container? HOT 3
- DownloadFile without Range.Count incurs 2 calls to GetProperties HOT 2
- Update the doc of InteractiveBrowserCred and DeviceCodeCred
- Pagination of Availability Statuses does not work HOT 5
- Go SDK for commercial-marketplace-client HOT 1
- Clean up track1 tool in eng/tools
- service Package HOT 1
- Download a specific version from Azure blob HOT 3
- Allow expiring authorization token for 403 response HOT 7
- Allow passing any policy on individual request done with a client HOT 1
- Cloud Shell ManagedIdentitySource should throw if a user-assigned managed identity clientID or resourceID is supplied
- Port AuthenticationRecord related caching doc HOT 1
- [Identity] AzurePipelinesCredential parameterless constructor and add to DAC HOT 1
- [Identity] Create a new credential to support FIC in Github Actions HOT 1
- Add tracing to the Cosmos Client HOT 7
- ARM Resource Health NewEmergingIssuesClient().NewListPager NextPage is failing to unmarshall armresourcehealth.EmergingIssue.RefreshTimestamp HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-sdk-for-go.