-
Notifications
You must be signed in to change notification settings - Fork 525
Availability: Adds account-level read regions as effective preferred regions when preferred regions is not set on client. #4709
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
Merged
kirankumarkolli
merged 39 commits into
master
from
users/jeet1995/crossRetryScenariosFixWhenPreferredRegionListIsEmpty
Oct 16, 2024
Merged
Conversation
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
…referredRegionListIsEmpty
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.
All good!
kirankumarkolli
previously approved these changes
Oct 10, 2024
…referredRegionListIsEmpty
…referredRegionListIsEmpty
…nListIsEmpty' of https://github.com/Azure/azure-cosmos-dotnet-v3 into users/jeet1995/crossRetryScenariosFixWhenPreferredRegionListIsEmpty
…referredRegionListIsEmpty
…referredRegionListIsEmpty
kirankumarkolli
approved these changes
Oct 16, 2024
jeet1995
added a commit
that referenced
this pull request
Feb 5, 2025
jeet1995
added a commit
that referenced
this pull request
Feb 5, 2025
This was referenced Jul 28, 2025
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
Problem Statement
As of today, customers who do not configure
ApplicationPreferredRegionsorApplicationRegionare pinned to either the hub region (in multi-write accounts) or the primary region (in single-write accounts). In outage scenarios, availability is scoped to just a single region and is not ideal (both reads/writes in multi-write accounts and reads in single-write multi-region accounts have their availability curbed to just the one region). SettingApplicationPreferredRegionsorApplicationRegionas empty is not an opt-out of availability decision from the customer's perspective unless of course on the client a regional endpoint has been set. This PR aims to fix this issue when preferred regions is not set, and a global endpoint is set on the client.Approach taken in this PR
The idea is to construct an effective preferred region list and to rely on account-level read and account-level write regions for it. If there is client-perceived unavailability or account-level topology changes - then this effective preferred regions list is reordered accordingly or reflects the account-level regions post a cached
DatabaseAccountrefresh in the SDK.There are also changes made to the flow which decides when
DatabaseAccountrefresh is triggered. The decision depends on a check whether the SDK has a different effective first preferred read / write region from the first account-level read / write region.Closing issues
closes #4665