[Internal]Nregion: Adds support for including nregioncommit synchronous for less than Strong Consistency#5401
Merged
microsoft-github-policy-service[bot] merged 4 commits intomasterfrom Sep 30, 2025
Conversation
f3a0659 to
76efe81
Compare
Member
|
Since we are bumping up the Direct version, it would be good to highlight the list of features (basically introduced through the cherry-picked commits) brought in through that direct release. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for N-region synchronous commit functionality for accounts with consistency levels less than Strong. The feature enables barrier requests for writes to ensure linearizability guarantees are maintained when GlobalNRegionCommittedGLSN hasn't caught up with the write LSN.
Key changes:
- Adds
EnableNRegionSynchronousCommitproperty toAccountPropertiesandAccountConfigurationProperties - Updates DocumentClient to pass N-region commit configuration to StoreClient during initialization
- Upgrades Direct package version from 3.40.3 to 3.41.0 to support new backend functionality
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| AccountProperties.cs | Adds EnableNRegionSynchronousCommit property for account-level feature configuration |
| DocumentClient.cs | Updates CreateStoreModel to extract and pass N-region commit settings to StoreClient |
| Directory.Build.props | Upgrades DirectVersion to 3.41.0 for backend N-region commit support |
| StoreReaderTest.cs | Adds comprehensive test for N-region synchronous commit barrier functionality |
| DocumentClientUnitTests.cs | Adds unit test to verify N-region commit configuration is passed to StoreClient |
| CosmosJsonSerializerUnitTests.cs | Updates serialization test to include new EnableNRegionSynchronousCommit property |
| TraceWriter.TraceJsonWriter.cs | Adds GlobalNRegionCommittedGLSN to trace output for debugging |
| ThinClientTransportSerializer.cs | Duplicates accountName parameter in SerializeProxyRequestAsync call |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
21f26f4 to
4109785
Compare
…ng StoreClient within DocumentClient
4109785 to
ca2149e
Compare
Updated ThinClientTransportSerializer to use regionalAccountName same as GlobalACcountName Updated the TracingWriter to serialize GlobalNRegionCommittedGLSN
ca2149e to
433c1a4
Compare
Member
Author
|
[celebrate] Ananth Mudumba reacted to your message:
…________________________________
From: Debdatta Kunda ***@***.***>
Sent: Tuesday, September 30, 2025 4:36:00 PM
To: Azure/azure-cosmos-dotnet-v3 ***@***.***>
Cc: Ananth Mudumba ***@***.***>; Assign ***@***.***>
Subject: Re: [Azure/azure-cosmos-dotnet-v3] [Internal]Nregion: Adds support for including nregioncommit synchronous for less than Strong Consistency (PR #5401)
@kundadebdatta approved this pull request.
LGTM
—
Reply to this email directly, view it on GitHub<#5401 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BMDK6G3XAWWLILEUZFV5HE33VKWPBAVCNFSM6AAAAACGJMOSNOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTEOBVHA2TKNBZGY>.
You are receiving this because you were assigned.Message ID: ***@***.***>
|
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Feature: N-region synchronous commit support for < Strong consistency in SDK)
This PR brings in N region syncrhonous commit for accounts that have this feature enabled. The feature primarly brings in Barrier requests for Writes for less than Strong consistencies
The change contains two parts (one part is in this PR and other is done in Msdata/released as Direct package version 3.41.0 which is consumed in this PR)
Part 2 THIS PR : V3 Repo changes which include changes in AccountProperties to read the support for Nregion Commit .
-Adds support for including nregioncommit account feature while creating StoreClient within DocumentClient
Part 1 CHanges to ConsistencyWriter for adding Barrier requests and StoreResult to support the new NRegionCommittedGLSN which is critical to performing the barriers.
This is done in the Msdata ShareFiles and a new Direct package version 3.41.0 is released with this change
Refactors ConsistencyWriter to support synchronous barrier commits in NRegion accounts (< Strong) when EnableNRegionSynchronousCommit is enabled.
Ensures response is only returned once GlobalNRegionCommittedGLSN has caught up with the write LSN, preserving linearizability
Change PR in msdata: https://msdata.visualstudio.com/CosmosDB/_git/CosmosDB/pullrequest/1800184
Direct package changes
Direct version upgrade to 3.41.0 brings in the following changes
Testing
Emulator test for NregionCommit Write Barrier
Used Http interceptor to "mock" nregioncommit feature enabled in AccountProperties.
Used Transport interceptor to mock GLobalNRegionCommitLSN for testing scenario.
Type of change
Please delete options that are not relevant.
Closing issues
To automatically close an issue: closes #IssueNumber