Skip to content

Commit

Permalink
renamed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ealsur committed Jan 5, 2022
1 parent 99dafe6 commit 380f8c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Microsoft.Azure.Cosmos/src/GatewayStoreModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ internal static async Task ApplySessionTokenAsync(
}

string requestConsistencyLevel = request.Headers[HttpConstants.HttpHeaders.ConsistencyLevel];
bool isConsideredAReadRequest = request.IsReadOnlyRequest || request.OperationType == OperationType.Batch;
bool requestHasConsistencySet = !string.IsNullOrEmpty(requestConsistencyLevel) && isConsideredAReadRequest; // Only read requests can have their consistency modified
bool isReadOrBatchRequest = request.IsReadOnlyRequest || request.OperationType == OperationType.Batch;
bool requestHasConsistencySet = !string.IsNullOrEmpty(requestConsistencyLevel) && isReadOrBatchRequest; // Only read requests can have their consistency modified

bool sessionConsistencyApplies =
(!requestHasConsistencySet && defaultConsistencyLevel == ConsistencyLevel.Session) ||
Expand All @@ -276,7 +276,7 @@ internal static async Task ApplySessionTokenAsync(
bool isMultiMasterEnabledForRequest = globalEndpointManager.CanUseMultipleWriteLocations(request);

if (!sessionConsistencyApplies
|| (!isConsideredAReadRequest
|| (!isReadOrBatchRequest
&& !isMultiMasterEnabledForRequest))
{
return; // Only apply the session token in case of session consistency and the request is read only or read/write on multimaster
Expand Down

0 comments on commit 380f8c5

Please sign in to comment.