-
Notifications
You must be signed in to change notification settings - Fork 2.2k
- Adding nregion feature to changelog #47987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Always parsing nregion header in storeresult
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Cosmos Java SDK to better support the N-Region synchronous commit feature by ensuring the N-Region global committed GLSN header is parsed into StoreResult, and documents the feature addition in the Cosmos changelog.
Changes:
- Always parse
x-ms-cosmos-global-nregion-committed-glsnintoStoreResult(including for exception responses). - Add a changelog entry advertising N-Region synchronous commit support for the upcoming beta release.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/StoreReader.java | Parse and propagate the N-Region committed GLSN header into StoreResult for the exception path. |
| sdk/cosmos/azure-cosmos/CHANGELOG.md | Document N-Region synchronous commit support under the next unreleased beta version. |
| headerValue = cosmosException.getResponseHeaders().get(WFConstants.BackendHeaders.GLOBAL_N_REGION_COMMITTED_GLSN); | ||
| if (!Strings.isNullOrEmpty(headerValue)) { | ||
| globalNRegionCommittedLSN = Long.parseLong(headerValue); | ||
| } |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change now always reads GLOBAL_N_REGION_COMMITTED_GLSN from CosmosException response headers, but there doesn’t appear to be unit test coverage validating StoreResult.globalNRegionCommittedLSN is populated for the exception path (including when both GLOBAL_COMMITTED_LSN and GLOBAL_N_REGION_COMMITTED_GLSN are present). Please add/extend a unit test (e.g., in StoreReaderTest) that constructs a CosmosException with these headers and asserts the resulting StoreResult fields.
| ### 4.79.0-beta.1 (Unreleased) | ||
|
|
||
| #### Features Added | ||
| * Added support for N-Region synchronous commit feature - See [PR 47757](https://github.com/Azure/azure-sdk-for-java/pull/47757) |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description still contains the template instruction text (“Please add an informative description… and link all relevant issues.”). Please replace that with an actual summary/repro/verification notes and any linked issues so the changelog entry and code change are properly traceable.
FabianMeiswinkel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR does the following:
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines