Skip to content

azure_data_cosmos@0.35.0

Pre-release
Pre-release

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 10 Jun 22:22
6e35769

0.35.0 (2026-06-09)

Features Added

  • Exposed cross-regional read hedging. Enable it by attaching an OperationOptions built with OperationOptionsBuilder::with_availability_strategy(AvailabilityStrategy::Hedging(HedgingStrategy::new(HedgeThreshold::new(threshold)?))) to a request (e.g. ItemReadOptions::with_operation_options) or to the client defaults via CosmosClientBuilder::with_operation_options. The AvailabilityStrategy, HedgingStrategy, and HedgeThreshold types are now re-exported from azure_data_cosmos. When enabled, the driver speculatively dispatches the read to a second preferred region after the configured threshold elapses and returns whichever response classifies as final first, cancelling the losing leg structurally (no detached tasks); AvailabilityStrategy::Disabled turns hedging off for that scope, and when no strategy is configured the driver applies a built-in default for multi-region reads. (#4432)
  • Added configurable retry limits for throttled (HTTP 429, rate-limited) requests, mirroring the .NET and Java SDKs' ThrottlingRetryOptions. A new nested ThrottlingRetryOptions group on OperationOptions (field throttling_retry_options) carries max_retry_count (env AZURE_COSMOS_MAX_THROTTLE_RETRY_COUNT, default 9, 0 disables throttle retries) and max_retry_wait_time (default 30s), settable per-request via OperationOptions/OperationOptionsBuilder and ThrottlingRetryOptionsBuilder. New client-wide setter CosmosClientBuilder::with_throttling_retry_options(ThrottlingRetryOptions) forwards the group as runtime-layer defaults. Both budgets apply per transport-pipeline invocation, not per logical operation — an operation that fans out across regions (failover, hedging) starts a fresh budget per leg; use OperationOptions::end_to_end_latency_policy to bound total per-operation wall-clock time. (#4544)

Bugs Fixed

  • Writes to multi-write Cosmos accounts now send the x-ms-cosmos-allow-tentative-writes: true request header. Without it, satellite write regions returned 403 / 3 (WriteForbidden), breaking write failover to non-primary regions. (#4500)