Hedging: Fixes behavior of hedging for metadata requests#5138
Closed
NaluTripician wants to merge 17 commits intomasterfrom
Closed
Hedging: Fixes behavior of hedging for metadata requests#5138NaluTripician wants to merge 17 commits intomasterfrom
NaluTripician wants to merge 17 commits intomasterfrom
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)) |
Member
There was a problem hiding this comment.
Lets go over it together.
Member
|
Is this a possibility? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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