Skip to content

[Internal] Per Partition Automatic Failover: Removes Remove Environment Variable to Set PPAF at the SDK Layer and Add Support for Internal Client Options#5284

Merged
kirankumarkolli merged 9 commits intomasterfrom
users/nalutripician/PPAFEnvVarRemoval
Jul 17, 2025
Merged

[Internal] Per Partition Automatic Failover: Removes Remove Environment Variable to Set PPAF at the SDK Layer and Add Support for Internal Client Options#5284
kirankumarkolli merged 9 commits intomasterfrom
users/nalutripician/PPAFEnvVarRemoval

Conversation

@NaluTripician
Copy link
Copy Markdown
Contributor

@NaluTripician NaluTripician commented Jul 15, 2025

Pull Request Template

Description

  • Remove Dependency on Environment Variable: Today, the PPAF enablement in the .NET SDK is done completely through the Get Account metadata response. However, we still kept the environment variable AZURE_COSMOS_PARTITION_LEVEL_FAILOVER_ENABLED at a deprecated state to toggle the behavior, if the cosmos account doesn't have the flag enabled. As a part of this task, we will remove the environment variable completely from the .NET SDK ecosystem.

  • Create a new Environment Variable to externalize circuit breaker timeout counter reset window: Goal is to create a new environment variable AZURE_COSMOS_PPCB_TIMEOUT_COUNTER_RESET_WINDOW_IN_MINUTES to externalize the PPCB timeout counter reset window. The default value for this would be 5 minutes.

  • Add New Internal Client Options to disable PPAF: Add a new internal cosmos client options to disable PPAF explicitly. Once set, this will be used to disable PPAF irrespective of the account settings.

Type of change

Please delete options that are not relevant.

  • [] New feature (non-breaking change which adds functionality)

Closing issues

To automatically close an issue: closes #5277

Comment thread Microsoft.Azure.Cosmos/src/Routing/GlobalEndpointManager.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs Outdated
Comment thread Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs Outdated
Copy link
Copy Markdown
Member

@kundadebdatta kundadebdatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Now.

@kirankumarkolli kirankumarkolli merged commit f869cce into master Jul 17, 2025
27 checks passed
@kirankumarkolli kirankumarkolli deleted the users/nalutripician/PPAFEnvVarRemoval branch July 17, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Enables automation to merge PRs PerPartitionAutomaticFailover

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Per Partition Automatic Failover] Remove Environment Variable to Set PPAF at the SDK Layer and Add Support for Internal Client Options

3 participants