[Internal] PPAF: Adds Code to Enable Read Hedging By Default#5165
Merged
kirankumarkolli merged 17 commits intomasterfrom May 9, 2025
Merged
Conversation
kundadebdatta
commented
May 5, 2025
jeet1995
previously approved these changes
May 7, 2025
Member
jeet1995
left a comment
There was a problem hiding this comment.
LGTM - only ask from my side would be to double check how PPCB behaves with hedging on by default. In the Java SDK, we encountered a bug where PPCB doesn't kick in with hedging.
kirankumarkolli
previously approved these changes
May 8, 2025
jeet1995
previously approved these changes
May 8, 2025
331f57d
jeet1995
previously approved these changes
May 8, 2025
kirankumarkolli
previously approved these changes
May 8, 2025
a4cde1b
aavasthy
approved these changes
May 9, 2025
kirankumarkolli
approved these changes
May 9, 2025
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 PR does the following two things:
Enables Cross Regional Hedging by default with a threshold of either
1second or half of the request timeout value provided, whichever is minimum, when PPAF is enabled. Note that the default availability strategy can be opted out by setting theAvailabilityStrategytoDisabledAvailabilityStrategyin theCosmosClientOptions. To understand this better, please take a look at the example below:As of today, during the cosmos client initialization, with PPAF enabled we ensure that either the
ApplicationRegionorApplicationPreferredRegionsis present through a validation. Since we now have established the concept of Effective Preferred Region, this PR removes the above mandatory validation onApplicationRegionorApplicationPreferredRegions, as in the if there are no preferred regions passed explicitly, the .NET SDK can populate the effective preferred regions.Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #5047, #5164