azure_data_cosmos@0.35.0
Pre-release
Pre-release
0.35.0 (2026-06-09)
Features Added
- Exposed cross-regional read hedging. Enable it by attaching an
OperationOptionsbuilt withOperationOptionsBuilder::with_availability_strategy(AvailabilityStrategy::Hedging(HedgingStrategy::new(HedgeThreshold::new(threshold)?)))to a request (e.g.ItemReadOptions::with_operation_options) or to the client defaults viaCosmosClientBuilder::with_operation_options. TheAvailabilityStrategy,HedgingStrategy, andHedgeThresholdtypes are now re-exported fromazure_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::Disabledturns 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 nestedThrottlingRetryOptionsgroup onOperationOptions(fieldthrottling_retry_options) carriesmax_retry_count(envAZURE_COSMOS_MAX_THROTTLE_RETRY_COUNT, default9,0disables throttle retries) andmax_retry_wait_time(default30s), settable per-request viaOperationOptions/OperationOptionsBuilderandThrottlingRetryOptionsBuilder. New client-wide setterCosmosClientBuilder::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; useOperationOptions::end_to_end_latency_policyto 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: truerequest header. Without it, satellite write regions returned403 / 3 (WriteForbidden), breaking write failover to non-primary regions. (#4500)