Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/cosmos/azure-cosmos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### 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)

#### Breaking Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ StoreResult createStoreResult(StoreResponse storeResponse,
int numberOfReadRegions = -1;
Double backendLatencyInMs = null;
Double retryAfterInMs = null;
long globalNRegionCommittedLSN = -1;

if (replicaStatusList != null) {
ImplementationBridgeHelpers
Expand Down Expand Up @@ -995,15 +996,14 @@ StoreResult createStoreResult(StoreResponse storeResponse,
numberOfReadRegions = Integer.parseInt(headerValue);
}

long globalNRegionCommittedLSN = -1;
headerValue = cosmosException.getResponseHeaders().get(WFConstants.BackendHeaders.GLOBAL_COMMITTED_LSN);
if (!Strings.isNullOrEmpty(headerValue)) {
globalCommittedLSN = Long.parseLong(headerValue);
} else {
headerValue = cosmosException.getResponseHeaders().get(WFConstants.BackendHeaders.GLOBAL_N_REGION_COMMITTED_GLSN);
if (!Strings.isNullOrEmpty(headerValue)) {
globalNRegionCommittedLSN = Long.parseLong(headerValue);
}
}

headerValue = cosmosException.getResponseHeaders().get(WFConstants.BackendHeaders.GLOBAL_N_REGION_COMMITTED_GLSN);
if (!Strings.isNullOrEmpty(headerValue)) {
globalNRegionCommittedLSN = Long.parseLong(headerValue);
}

headerValue = cosmosException.getResponseHeaders().get(HttpConstants.HttpHeaders.BACKEND_REQUEST_DURATION_MILLISECONDS);
Expand Down
Loading