-
Notifications
You must be signed in to change notification settings - Fork 877
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
[Cosmos] Implements Client Retry policy #22394
Conversation
I just realized we are missing something critical. We are never "initializing" the SDK. The first operation that comes needs to "initialize" the SDK by performing a request to GEM to obtain the account information, that will initialize the location cache. Otherwise, requests cannot be routed. We can certainly leave that part for another PR, but it needs to happen only for the first request (like other SDKs) |
… change, remove duplicates
@ealsur On the initialization bit, I thought that was taken care of by the gemPolicy? when we initialize the gem that gets passed to the gem policy we set it's lastUpdateTime to time.Time{} (beginning of time), which ensures the first request in the pipeline will run the Update() method in the gemPolicy, populating the account information in the gem + location cache |
Once we have everything in place, these are the manual validation steps we should perform:
Scenario 1 - Removing a region
Scenario 2 - Adding a region
Scenario 3 - Failover
|
Closes #18985.
This PR in it's entirety will include:
Client Retry policy implementation covering:
location_cache
to resolve service endpoint to be used on cross-regional retriesDisableCrossRegionalRetries
(known asenable_endpoint_discovery
in most other SDKs - have to use a negative here for boolean default in Go). -> PR here.go.mod
file from go 1.18 to go 1.22 and updateci.yml
- 1.21 is the earliest version containing a Go-nativemin()
method and the ci pipelines test current version, N-1 and N-2