Skip to content

Cosmos: Fix spec inaccuracies in PPAF/PPCB design doc#3918

Draft
Copilot wants to merge 6 commits intorelease/azure_data_cosmos-previewsfrom
copilot/sub-pr-3880
Draft

Cosmos: Fix spec inaccuracies in PPAF/PPCB design doc#3918
Copilot wants to merge 6 commits intorelease/azure_data_cosmos-previewsfrom
copilot/sub-pr-3880

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

Five correctness discrepancies between the spec and the actual implementation, identified during review.

Fixes

  • ReadSessionNotAvailable substatus: 10221002 in the status-code matrix. 1022 is LeaseNotFound; 1002 is ReadSessionNotAvailable (aliased as PARTITION_KEY_RANGE_GONE on HTTP 410).
  • partition_level_circuit_breaker_enabled description: Replaced "master switch" with the actual OR-logic — PPCB is active if enable_per_partition_failover_behavior || partition_level_circuit_breaker_enabled. Setting the env var to false only disables PPCB when the server flag is also false.
  • Background failback scope: "scans all failed-over partitions" → "scans the PPCB map". The PPAF map is not touched by the failback loop (documented in §9.4).
  • PartitionKeyRange equality/hashing: Updated the struct snippet to include resource_id: Option<String> and corrected the description — hashing covers id, resource_id, min_inclusive, and max_exclusive, not id alone. Floating-point throughput fields are excluded because f64 doesn't implement Hash.
  • Broken cross-reference: Fixed TRANSPORT_PIPELINE_SPEC.md../azure_data_cosmos_driver/docs/TRANSPORT_PIPELINE_SPEC.md.

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

- Fix background failback description: clarify it scans PPCB map only,
  not all failed-over partitions (§9.4 scope limitation)
- Fix partition_level_circuit_breaker_enabled description: replace
  misleading "master switch" with accurate OR-logic explanation
- Fix ReadSessionNotAvailable substatus: 1002 not 1022 (1022=LeaseNotFound)
- Fix PartitionKeyRange struct: add resource_id field and update equality/
  hashing description to include id+resource_id+min_inclusive+max_exclusive
- Fix broken link: TRANSPORT_PIPELINE_SPEC.md → correct relative path

Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com>
Copilot AI changed the title [WIP] Add per partition automatic failover and circuit breaker specs Cosmos: Fix spec inaccuracies in PPAF/PPCB design doc Mar 11, 2026
Base automatically changed from users/kundadebdatta/add_ppaf_spec_for_driver to release/azure_data_cosmos-previews March 16, 2026 22:00
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.

3 participants