Skip to content

[Internal] Spec: Adds Gateway Account Property Flag for Dynamic Hedging Control#5719

Open
NaluTripician wants to merge 8 commits intomainfrom
users/nalutripician/ppaf-dynamic-hedging-spec
Open

[Internal] Spec: Adds Gateway Account Property Flag for Dynamic Hedging Control#5719
NaluTripician wants to merge 8 commits intomainfrom
users/nalutripician/ppaf-dynamic-hedging-spec

Conversation

@NaluTripician
Copy link
Copy Markdown
Contributor

@NaluTripician NaluTripician commented Mar 24, 2026

Summary

Introduces the OpenSpec specification artifacts for a Gateway-controlled account property flag (disableCrossRegionalHedging) that enables on-call engineers to dynamically disable hedging for PPAF-enabled Cosmos DB accounts without rolling back PPAF entirely.

Motivation

Production incidents have shown that implicit hedging of long-running queries on PPAF accounts can cause unexpected exceptions (e.g., ArgumentException in CallStore). Rolling back PPAF to disable hedging is operationally expensive. This spec proposes a targeted, service-side escape hatch.

Spec Artifacts

Artifact Description
proposal.md Problem statement, motivation, and capability identification
design.md Technical design: evaluation point, enforcement mechanism, precedence rules, state tracking
specs/gateway-hedging-override/spec.md Detailed requirements with 18 testable scenarios covering flag evaluation, dynamic toggling, precedence, non-PPAF isolation, and API surface
tasks.md 16-task implementation checklist across 7 groups

Key Design Decisions

  • Property location: Strongly-typed bool? on AccountProperties (consistent with EnablePartitionLevelFailover)
  • Evaluation point: DocumentClient.UpdatePartitionLevelFailoverConfigWithAccountRefresh() — same callback that handles dynamic PPAF changes
  • Enforcement: Strategy nullification with stored original reference for restoration
  • Precedence: Gateway flag true overrides all hedging config (explicit + implicit)

Precedence Rules

  1. Gateway disableCrossRegionalHedging = trueHedging OFF (highest priority)
  2. Gateway flag false or absent → existing rules apply (request-level → client-level → PPAF default)
  3. Non-PPAF accounts ignore the flag

No Code Changes

This PR contains specification artifacts only — no SDK code changes are included. Implementation will follow in a separate PR.

NaluTripician and others added 4 commits March 24, 2026 16:37
…ng Control

Introduces OpenSpec artifacts for a new Gateway-controlled account property
(disableCrossRegionalHedging) that allows on-call engineers to dynamically
disable hedging for PPAF-enabled accounts without rolling back PPAF.

Artifacts:
- proposal.md: Problem statement and motivation
- design.md: Technical design with precedence rules and evaluation strategy
- specs/gateway-hedging-override/spec.md: Detailed requirements and scenarios
- tasks.md: Implementation checklist

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant