Skip to content

Commit ebd017a

Browse files
committed
Update isthinclient enabled check with gateway mode.
1 parent 4bddf05 commit ebd017a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Microsoft.Azure.Cosmos/src/DocumentClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,9 +1098,9 @@ private async Task<bool> GetInitializationTaskAsync(IStoreClientFactory storeCli
10981098
this.partitionKeyRangeCache = new PartitionKeyRangeCache(this, this.GatewayStoreModel, this.collectionCache, this.GlobalEndpointManager, this.enableAsyncCacheExceptionNoSharing);
10991099
this.ResetSessionTokenRetryPolicy = new ResetSessionTokenRetryPolicyFactory(this.sessionContainer, this.collectionCache, this.retryPolicy);
11001100

1101-
gatewayStoreModel.SetCaches(this.partitionKeyRangeCache, this.collectionCache);
1102-
1103-
if (this.isThinClientEnabled)
1101+
gatewayStoreModel.SetCaches(this.partitionKeyRangeCache, this.collectionCache);
1102+
1103+
if (this.ConnectionPolicy.ConnectionMode == ConnectionMode.Gateway && this.isThinClientEnabled)
11041104
{
11051105
ThinClientStoreModel thinClientStoreModel = new (
11061106
endpointManager: this.GlobalEndpointManager,

0 commit comments

Comments
 (0)