Skip to content

Hybrid client/server PATCH execution - #5196

Merged
Fabian Meiswinkel (FabianMeiswinkel) merged 49 commits into
mainfrom
users/fabianm/Patch_C
Sep 2, 2026
Merged

Hybrid client/server PATCH execution#5196
Fabian Meiswinkel (FabianMeiswinkel) merged 49 commits into
mainfrom
users/fabianm/Patch_C

Conversation

@FabianMeiswinkel

Copy link
Copy Markdown
Member

Summary

Adds configurable PATCH execution through Auto, ClientSide, and ServerSide strategies.

  • Uses server-side PATCH for bounded, retry-safe instruction lists and client-side RMW otherwise.
  • Applies strategy-aware retry handling to prevent replaying unsafe server-side mutations after ambiguous failures.
  • Forces LatestCommitted verification reads across Gateway V1 and Gateway 2.0.
  • Preserves response-body options and PATCH tracking behavior across both execution paths.
  • Expands emulator and fault-injection coverage for routing, retries, service limits, and exactly-once behavior.

## Summary

- Adds bounded duplicate suppression for non-idempotent client-side PATCH operations by atomically storing `_azsdkPatchTracking` markers with the inner Replace.
- Supports caller-provided tracking IDs across application and process retries, 15-minute service-time retention, configurable capacity, conservative replay-safety classification, and fail-closed behavior.
- Exposes tracking through the Rust preview API and additive native v2 request/submit APIs while preserving the v1 ABI.
- Adds post-service response-timeout fault injection and end-to-end coverage proving a committed PATCH is not applied twice when its response is lost. Cooperating full-document writers must preserve the reserved property.
Add Default for both public PatchTrackingId models so all-target Clippy remains clean.

Complete the unreleased API inventories with PatchInstructions::is_retry_safe and the SDK fault-injection addition.
Keep verification-only reads independent of _ts while centralizing insertion-time validation beside the timestamp lookup.
Copilot AI balanced review requested due to automatic review settings August 31, 2026 18:46
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
3 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@FabianMeiswinkel Fabian Meiswinkel (FabianMeiswinkel) changed the title Users/fabianm/patch c Hybrid client/server PATCH execution Aug 31, 2026
@FabianMeiswinkel

Copy link
Copy Markdown
Member Author

/azp run rust - cosmos - weekly

@azure-pipelines

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

@heaths Heath Stewart (heaths) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed off on ci.tests.yml change only.

@FabianMeiswinkel

Copy link
Copy Markdown
Member Author

/azp run rust - cosmos - weekly

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@FabianMeiswinkel

Copy link
Copy Markdown
Member Author

/azp run rust - cosmos - weekly

@azure-pipelines

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

@FabianMeiswinkel

Copy link
Copy Markdown
Member Author

/azp run rust - cosmos - weekly

@azure-pipelines

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

@FabianMeiswinkel

Copy link
Copy Markdown
Member Author

/azp run rust - cosmos - weekly

@azure-pipelines

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

@FabianMeiswinkel

Copy link
Copy Markdown
Member Author

/azp run rust - cosmos - weekly

@azure-pipelines

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

@FabianMeiswinkel
Fabian Meiswinkel (FabianMeiswinkel) merged commit 7c672c4 into main Sep 2, 2026
40 of 43 checks passed
@FabianMeiswinkel
Fabian Meiswinkel (FabianMeiswinkel) deleted the users/fabianm/Patch_C branch September 2, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cosmos The azure_cosmos crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants