From c098777f0b8f81684981af62a10e14a00fe75815 Mon Sep 17 00:00:00 2001 From: Nalu Tripician Date: Fri, 3 Mar 2023 15:37:44 -0500 Subject: [PATCH] no longer recread feedRange for queries unless using prefix pk --- Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs | 2 +- .../Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs b/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs index a3675f4878..423e82ea14 100644 --- a/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs +++ b/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs @@ -503,7 +503,7 @@ internal static async Task ResolveFeedRangeBasedOnPrefixContainerAsyn if (partitionKeyDefinition != null && partitionKeyDefinition.Kind == PartitionKind.MultiHash) { return feedRangePartitionKey.PartitionKey.InternalKey?.Components?.Count >= partitionKeyDefinition.Paths?.Count - ? new FeedRangePartitionKey(feedRangePartitionKey.PartitionKey) + ? feedRange : new FeedRangeEpk(feedRangePartitionKey.PartitionKey.InternalKey.GetEPKRangeForPrefixPartitionKey(partitionKeyDefinition)); } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs index 76b2d67341..3c590092db 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -245,7 +245,7 @@ public async Task MultiHashReadManyTest() .Build(); itemList.Add((document.Id, pKey)); - incompleteList.Add((document.Id, badPKey)); + incompleteList.Add((document.Id, badPKey)); } FeedResponse feedResponse = await this.container.ReadManyItemsAsync(itemList);