Skip to content

Commit ee5330b

Browse files
committed
fix: addressing comments
1 parent 8952be8 commit ee5330b

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public virtual async Task<ResponseMessage> SendAsync(
305305
// For epk range filtering we can end up in one of 3 cases:
306306
if (overlappingRanges.Count > 1)
307307
{
308-
//If we are running a query and our provided partition key results in a hash that resolves to more than one EPKRanges then its a valid use case
308+
//If we are running a query plan and our provided partition key results in a hash that resolves to more than one EPKRanges then its a valid use case
309309
bool isQueryOperation = request.ResourceType == ResourceType.Document && request.OperationType == OperationType.QueryPlan;
310310
if (!isQueryOperation)
311311
{
@@ -321,9 +321,6 @@ public virtual async Task<ResponseMessage> SendAsync(
321321

322322
return goneException.ToCosmosResponseMessage(request);
323323
}
324-
// For query operations spanning multiple partitions, we don't set PartitionKeyRangeId
325-
// because the query engine needs to handle this case differently
326-
// Just continue without setting PartitionKeyRangeId
327324
}
328325
// overlappingRanges.Count == 1
329326
else

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/RetryHandlerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ public async Task ValidatePassingOverlappingRangesInQueryPlanDoesntThrowAnExcept
5151
// Mock PartitionKeyRangeCache
5252
List<PartitionKeyRange> overlappingRanges = new List<PartitionKeyRange>
5353
{
54-
new PartitionKeyRange { Id = "0", MinInclusive = "A", MaxExclusive = "Z" },
55-
new PartitionKeyRange { Id = "1", MinInclusive = "M", MaxExclusive = "Z" }
54+
new PartitionKeyRange { Id = "0", MinInclusive = "0D4DC2CD8F49C65A8E0C5306B61B4343", MaxExclusive = "0DCEB8CE51C6BFE84F4BD9409F69B9BB2164DEBD78C50C850E0C1E3E3F0579ED" },
55+
new PartitionKeyRange { Id = "1", MinInclusive = "0DCEB8CE51C6BFE84F4BD9409F69B9BB2164DEBD78C50C850E0C1E3E3F0579ED", MaxExclusive = "1080F600C27CF98DC13F8639E94E7676" }
5656
};
5757
PartitionKeyRangeCache pkRangeCache = new TestPartitionKeyRangeCache(overlappingRanges);
5858

5959
// FeedRangeEpk for the test
60-
FeedRangeEpk feedRange = new FeedRangeEpk(new Documents.Routing.Range<string>("A", "Z", true, false));
60+
FeedRangeEpk feedRange = new FeedRangeEpk(new Documents.Routing.Range<string>("0DCEB8CE51C6BFE84F4BD9409F69B9BB", "0DCEB8CE51C6BFE84F4BD9409F69B9BBFF", true, false));
6161
RequestInvokerHandler invoker = new RequestInvokerHandler(client, null, null, null)
6262
{
6363
InnerHandler = new TestHandler((request, token) => TestHandler.ReturnSuccess())

0 commit comments

Comments
 (0)