Skip to content

Commit dcbddf2

Browse files
Update Hedging Detection API spec to current state
Reconcile sdk/cosmos/azure_data_cosmos/docs/HEDGING_DETECTION_API_SPEC.md with the now-merged Rust hedging design spec (PR #4330, on release/azure_data_cosmos-previews) and align it with the cross-SDK Hedging Detection API contract. Key updates: - Describe the cross-SDK contract generically (no SDK-specific naming) and add a Rust-to-contract mapping table. - requested_regions() now returns Vec<RequestedRegion> carrying a RequestedRegionReason, conforming to the contract's per-region-reason shape; add the public RequestedRegion struct and RequestedRegionReason enum plus a From<ExecutionContext> mapping. This resolves the previously-deferred per-region-reason question. - Correct the Retry to OperationRetry rename mechanics to the real code: ExecutionContext derives Serialize only (no Deserialize), and the hand-written as_str() must also be updated; serde(alias) is now conditional on adding Deserialize. - Fix the HedgeDiagnostics reconciliation: strategy_config and response_region are non-optional in the merged HEDGING_SPEC.md; fix the hedging_started() doc-comment that called as_ref() on a non-Option. - Correct the surface inventory: real dispatch-site paths, Serialize-only derive, and that regions_contacted() is sorted/deduped (so new accessors are needed for dispatch/completion order with duplicates). - Complete the file, which was truncated mid-section 8.2: finish the test plan and add section 9 (CHANGELOG drafts) and section 10 (open questions). Spec-only; no production code changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5f5d8c4 commit dcbddf2

1 file changed

Lines changed: 475 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)