-
Notifications
You must be signed in to change notification settings - Fork 526
Hedging: Fixes behavior of hedging for metadata requests #5138
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
Hedging: Fixes behavior of hedging for metadata requests #5138
Conversation
…ps://github.com/Azure/azure-cosmos-dotnet-v3 into users/nalutripician/hedgingCancellationTokenFix
|
|
||
| //Send out hedged requests | ||
| for (int requestNumber = 0; requestNumber < hedgeRegions.Count; requestNumber++) | ||
| using (RequestMessage nonModifiedRequestClone = request.Clone(hedgingTrace, clonedBody)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets go over it together.
|
Is this a possibility? |
Pull Request Template
Description
This pull request refactors the request handling and availability strategy implementation. The changes streamline method signatures, improve traceability, and enhance the extensibility of the availability strategy logic. Key updates include the introduction of a new
SendInternalAsyncmethod, modifications to theExecuteAvailabilityStrategyAsyncmethod, and updates to cross-region hedging logic.Background
There is currently a bug in the SDK where hedging will not kick in if there is a delay for the metadata calls to the gateway that are made with every request. This is because hedging occurs after these requests are made. This PR refactors the behavior of hedging, so the metadata calls are included as part of the hedging flow. This PR also fixes a bug where cancellation tokens would not properly work for hedged write requests.
Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #5061