From c5afef5737ec3c3cd756e0a5218b4e80f00e6a77 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Thu, 21 Dec 2023 14:01:16 -0800 Subject: [PATCH 01/25] Turned on ODe by default --- .../src/RequestOptions/QueryRequestOptions.cs | 10 +--------- .../CosmosBasicQueryTests.cs | 4 ---- .../CosmosGatewayTimeoutTests.cs | 2 -- .../CosmosItemSessionTokenTests.cs | 2 -- .../CosmosJsonSerializerTests.cs | 12 ++++-------- .../FeedToken/QueryFeedTokenTests.cs | 7 ++----- .../Linq/LinqTestsCommon.cs | 6 ------ .../Linq/LinqTranslationBaselineTests.cs | 2 -- .../Query/AggregateQueryTests.cs | 2 -- .../Query/SanityQueryTests.cs | 4 ---- .../Tracing/EndToEndTraceWriterBaselineTests.cs | 4 +--- .../OptimisticDirectExecutionQueryBaselineTests.cs | 8 +------- 12 files changed, 9 insertions(+), 54 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs index a4557da6d2..3e410c3892 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs @@ -50,15 +50,7 @@ public class QueryRequestOptions : RequestOptions /// /// Direct (optimistic) execution offers improved performance for several kinds of queries such as a single partition streaming query. /// -#if PREVIEW - public -#else - internal -#endif - bool EnableOptimisticDirectExecution { get; set; } -#if PREVIEW - = true; -#endif + public bool EnableOptimisticDirectExecution { get; set; } = true; /// /// Gets or sets the maximum number of items that can be buffered client side during diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs index bfd6366104..35e18bdbc5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs @@ -240,9 +240,7 @@ public async Task QueryRequestRateTest(bool directMode) { MaxItemCount = 1, MaxConcurrency = 1, -#if PREVIEW EnableOptimisticDirectExecution = false -#endif })) { while (feedIterator.HasMoreResults) @@ -271,9 +269,7 @@ public async Task QueryRequestRateTest(bool directMode) { MaxItemCount = 1, MaxConcurrency = 1, -#if PREVIEW EnableOptimisticDirectExecution = false -#endif }); // First request should be a success diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs index 241b60fb7f..ddf953258a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs @@ -83,9 +83,7 @@ public async Task QueryPlanRetryTimeoutTestAsync() QueryRequestOptions requestOptions = new QueryRequestOptions() { -#if PREVIEW EnableOptimisticDirectExecution = false -#endif }; using FeedIterator iterator = gatewayQueryPlanContainer.GetItemQueryIterator("select * From T order by T.status", requestOptions: requestOptions); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs index c76110f1fb..3467e8cf34 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs @@ -367,9 +367,7 @@ public async Task InvalidSessionTokenAfterContainerRecreationAndCollectionCacheR { ConsistencyLevel = Cosmos.ConsistencyLevel.Session, PartitionKey = new Cosmos.PartitionKey(pk), -#if PREVIEW EnableOptimisticDirectExecution = false -#endif }); int itemCountOldContainer = 0; while (queryIteratorOldContainer.HasMoreResults) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs index eadb62da7c..d1431511ba 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs @@ -98,10 +98,8 @@ public async Task TestQueryWithCustomJsonSerializer() fromStreamCount = 0; FeedIterator itemIterator = container.GetItemQueryIterator( - query -#if PREVIEW - , requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } -#endif + query, + requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } ); List items = new List(); while (itemIterator.HasMoreResults) @@ -117,10 +115,8 @@ public async Task TestQueryWithCustomJsonSerializer() // Verify that the custom serializer is actually being used via stream FeedIterator itemStreamIterator = container.GetItemQueryStreamIterator( - query -#if PREVIEW - , requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } -#endif + query, + requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } ); while (itemStreamIterator.HasMoreResults) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs index ce9723e7ee..e97d40bee9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs @@ -101,11 +101,8 @@ public async Task InexistentPKRangeId() FeedIterator feedIterator = container.GetItemQueryIterator( queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), feedRange: feedRange, - continuationToken: null - -#if PREVIEW - , requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } -#endif + continuationToken: null, + requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } ); CosmosException exception = await Assert.ThrowsExceptionAsync(() => feedIterator.ReadNextAsync()); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs index c8513e41b8..0dff269f0d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs @@ -308,9 +308,7 @@ public static Func> GenerateTestCosmosData(Func query = container.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions); @@ -350,9 +348,7 @@ public static Func> GenerateSerializationTestCosmosData(F FeedOptions feedOptions = new FeedOptions() { EnableScanInQuery = true, EnableCrossPartitionQuery = true }; QueryRequestOptions requestOptions = new QueryRequestOptions() { -#if PREVIEW EnableOptimisticDirectExecution = false -#endif }; CosmosLinqSerializerOptions linqSerializerOptions = new CosmosLinqSerializerOptions { PropertyNamingPolicy = camelCaseSerialization ? CosmosPropertyNamingPolicy.CamelCase : CosmosPropertyNamingPolicy.Default }; @@ -538,9 +534,7 @@ public static Func> GenerateSimpleCosmosData(Cosmos.Datab FeedOptions feedOptions = new FeedOptions() { EnableScanInQuery = true, EnableCrossPartitionQuery = true }; QueryRequestOptions requestOptions = new QueryRequestOptions() { -#if PREVIEW EnableOptimisticDirectExecution = false -#endif }; IOrderedQueryable query = container.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs index f13a92da82..2fd8a399f0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs @@ -1221,9 +1221,7 @@ public void TestSelectTop() List data = generatedData.Item2; QueryRequestOptions requestOptions = new QueryRequestOptions() { -#if PREVIEW EnableOptimisticDirectExecution = false -#endif }; IOrderedQueryable query = testContainer.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs index d60f76f92c..0cb380787d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs @@ -152,9 +152,7 @@ async Task ImplementationAsync( new QueryRequestOptions() { MaxConcurrency = maxDoP, -#if PREVIEW EnableOptimisticDirectExecution = false -#endif }); if (argument.ExpectedValue == null) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs index 2074902249..91078a21c8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs @@ -538,9 +538,7 @@ static async Task ImplementationAsync(Container container, IReadOnlyList MaxBufferedItemCount = 7000, MaxConcurrency = maxDegreeOfParallelism, MaxItemCount = maxItemCount, -#if PREVIEW EnableOptimisticDirectExecution = false -#endif }; async Task> AssertPassthroughAsync(string query, Cosmos.PartitionKey? pk = default) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index 6cd8905b07..bea68927ee 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -486,9 +486,7 @@ public async Task QueryAsync() List inputs = new List(); QueryRequestOptions requestOptions = new QueryRequestOptions() { -#if PREVIEW - EnableOptimisticDirectExecution = false -#endif + EnableOptimisticDirectExecution = false }; int startLineNumber; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index d236b73a56..8f5b8e4cf5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -150,13 +150,7 @@ public void NegativeOptimisticDirectExecutionOutput() public void TestDefaultQueryRequestOptionsSettings() { QueryRequestOptions requestOptions = new QueryRequestOptions(); - bool odeExpectedValue = -#if PREVIEW - true; -#else - false; -#endif - + bool odeExpectedValue = true; Assert.AreEqual(odeExpectedValue, requestOptions.EnableOptimisticDirectExecution); } From 1829faca4be4396d4fe508645ad49d5a566e65fd Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Tue, 2 Jan 2024 16:08:40 -0500 Subject: [PATCH 02/25] update subpartitioning tests to include ODE --- .../CosmosMultiHashTest.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 5307145dfc..a36c2de75d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -464,7 +464,7 @@ public async Task MultiHashQueryItemTest() using (FeedIterator feedIterator = this.container.GetItemQueryIterator( query, null, - new QueryRequestOptions() { PartitionKey = pKey })) + new QueryRequestOptions() { EnableOptimisticDirectExecution = true, PartitionKey = pKey })) { Assert.IsTrue(feedIterator.HasMoreResults); @@ -481,7 +481,7 @@ public async Task MultiHashQueryItemTest() using (FeedIterator feedIterator = this.container.GetItemQueryIterator( query, null, - new QueryRequestOptions() { PartitionKey = pKey })) + new QueryRequestOptions() { EnableOptimisticDirectExecution = true, PartitionKey = pKey })) { Assert.IsTrue(feedIterator.HasMoreResults); @@ -495,7 +495,7 @@ public async Task MultiHashQueryItemTest() using (FeedIterator badFeedIterator = this.container.GetItemQueryIterator( query, null, - new QueryRequestOptions() { PartitionKey = badPKey})) + new QueryRequestOptions() { EnableOptimisticDirectExecution = true, PartitionKey = badPKey})) { FeedResponse queryDocBad = await badFeedIterator.ReadNextAsync(); Assert.ThrowsException(() => From 1bac380ed1c4929a460ffc00227a048c9b83b68b Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Wed, 3 Jan 2024 10:28:20 -0800 Subject: [PATCH 03/25] Updated contracts --- ...tClientDistributionPlanDeserialization.xml | 272 +++++++++--------- .../PartitionKeyHashBaselineTest.Lists.xml | 60 ++-- .../Contracts/DotNetPreviewSDKAPI.json | 53 +--- .../Contracts/DotNetSDKAPI.json | 38 +++ 4 files changed, 205 insertions(+), 218 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ClientDistributionPlanBaselineTests.TestClientDistributionPlanDeserialization.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ClientDistributionPlanBaselineTests.TestClientDistributionPlanDeserialization.xml index c59b58aef1..6b4c4a69cb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ClientDistributionPlanBaselineTests.TestClientDistributionPlanDeserialization.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ClientDistributionPlanBaselineTests.TestClientDistributionPlanDeserialization.xml @@ -8,7 +8,7 @@ { "Cql": { "Name": "root", - "Kind": 3 + "Kind": "Input" } } @@ -24,13 +24,13 @@ "SourceExpression": { "SourceExpression": { "Name": "root", - "Kind": 3 + "Kind": "Input" }, "Aggregate": { - "OperatorKind": 8, - "Kind": 0 + "OperatorKind": "Sum", + "Kind": "Builtin" }, - "Kind": 0 + "Kind": "Aggregate" }, "DeclaredVariable": { "Name": "v0", @@ -45,14 +45,14 @@ "Name": "v0", "UniqueId": 6 }, - "Kind": 14 + "Kind": "VariableRef" } } ], "ObjectKind": "Object", - "Kind": 7 + "Kind": "ObjectCreate" }, - "Kind": 6 + "Kind": "Select" } } @@ -69,7 +69,7 @@ "SourceExpression": { "SourceExpression": { "Name": "root", - "Kind": 3 + "Kind": "Input" }, "DeclaredVariable": { "Name": "v0", @@ -83,16 +83,16 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" }, { "ConditionExpression": { - "OperatorKind": 1, + "OperatorKind": "And", "LeftExpression": { - "OperatorKind": 14, + "OperatorKind": "NotEqual", "LeftExpression": { "Expression": { "Expression": { @@ -100,27 +100,27 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" }, "RightExpression": { "Literal": { "Value": 0, - "Kind": 4 + "Kind": "Number" }, - "Kind": 5 + "Kind": "Literal" }, - "Kind": 2 + "Kind": "BinaryOperator" }, "RightExpression": { - "OperatorKind": 2, + "OperatorKind": "Not", "Expression": { - "FunctionKind": 55, + "FunctionKind": "Is_Defined", "Arguments": [ { "Expression": { @@ -129,27 +129,27 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" } ], - "Kind": 9 + "Kind": "SystemFunctionCall" }, - "Kind": 12 + "Kind": "UnaryOperator" }, - "Kind": 2 + "Kind": "BinaryOperator" }, "LeftExpression": { "Literal": { "Items": [], - "Kind": 1 + "Kind": "Array" }, - "Kind": 5 + "Kind": "Literal" }, "RightExpression": { "Expression": { @@ -158,23 +158,23 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" }, - "Kind": 6 + "Kind": "Mux" }, { "Items": [ { "ConditionExpression": { - "OperatorKind": 1, + "OperatorKind": "And", "LeftExpression": { - "OperatorKind": 14, + "OperatorKind": "NotEqual", "LeftExpression": { "Expression": { "Expression": { @@ -183,30 +183,30 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 2, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" }, "RightExpression": { "Literal": { "Value": 0, - "Kind": 4 + "Kind": "Number" }, - "Kind": 5 + "Kind": "Literal" }, - "Kind": 2 + "Kind": "BinaryOperator" }, "RightExpression": { - "OperatorKind": 2, + "OperatorKind": "Not", "Expression": { - "FunctionKind": 55, + "FunctionKind": "Is_Defined", "Arguments": [ { "Expression": { @@ -216,30 +216,30 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 2, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" } ], - "Kind": 9 + "Kind": "SystemFunctionCall" }, - "Kind": 12 + "Kind": "UnaryOperator" }, - "Kind": 2 + "Kind": "BinaryOperator" }, "LeftExpression": { "Literal": { "Items": [], - "Kind": 1 + "Kind": "Array" }, - "Kind": 5 + "Kind": "Literal" }, "RightExpression": { "Expression": { @@ -248,15 +248,15 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 2, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" }, - "Kind": 6 + "Kind": "Mux" }, { "Expression": { @@ -265,22 +265,22 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 2, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" } ], - "Kind": 10 + "Kind": "TupleCreate" }, { "ConditionExpression": { - "OperatorKind": 1, + "OperatorKind": "And", "LeftExpression": { - "OperatorKind": 14, + "OperatorKind": "NotEqual", "LeftExpression": { "Expression": { "Expression": { @@ -288,27 +288,27 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 3, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" }, "RightExpression": { "Literal": { "Value": 0, - "Kind": 4 + "Kind": "Number" }, - "Kind": 5 + "Kind": "Literal" }, - "Kind": 2 + "Kind": "BinaryOperator" }, "RightExpression": { - "OperatorKind": 2, + "OperatorKind": "Not", "Expression": { - "FunctionKind": 55, + "FunctionKind": "Is_Defined", "Arguments": [ { "Expression": { @@ -317,27 +317,27 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 3, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" } ], - "Kind": 9 + "Kind": "SystemFunctionCall" }, - "Kind": 12 + "Kind": "UnaryOperator" }, - "Kind": 2 + "Kind": "BinaryOperator" }, "LeftExpression": { "Literal": { "Items": [], - "Kind": 1 + "Kind": "Array" }, - "Kind": 5 + "Kind": "Literal" }, "RightExpression": { "Expression": { @@ -346,46 +346,46 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 3, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" }, - "Kind": 6 + "Kind": "Mux" } ], - "Kind": 10 + "Kind": "TupleCreate" }, - "Kind": 6 + "Kind": "Select" }, "KeyCount": 1, "Aggregates": [ { - "OperatorKind": 8, - "Kind": 0 + "OperatorKind": "Sum", + "Kind": "Builtin" }, { "Items": [ { - "OperatorKind": 8, - "Kind": 0 + "OperatorKind": "Sum", + "Kind": "Builtin" }, { - "OperatorKind": 8, - "Kind": 0 + "OperatorKind": "Sum", + "Kind": "Builtin" } ], - "Kind": 1 + "Kind": "Tuple" }, { - "OperatorKind": 6, - "Kind": 0 + "OperatorKind": "Max", + "Kind": "Builtin" } ], - "Kind": 2 + "Kind": "GroupBy" }, "DeclaredVariable": { "Name": "v0", @@ -405,10 +405,10 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" } }, { @@ -419,17 +419,17 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" } }, { "Name": "FieldAvg", "Expression": { "ConditionExpression": { - "OperatorKind": 6, + "OperatorKind": "Equal", "LeftExpression": { "Expression": { "Expression": { @@ -437,31 +437,31 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 2, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" }, "RightExpression": { "Literal": { "Value": 0, - "Kind": 4 + "Kind": "Number" }, - "Kind": 5 + "Kind": "Literal" }, - "Kind": 2 + "Kind": "BinaryOperator" }, "LeftExpression": { "Literal": { - "Kind": 0 + "Kind": "Undefined" }, - "Kind": 5 + "Kind": "Literal" }, "RightExpression": { - "OperatorKind": 5, + "OperatorKind": "Divide", "LeftExpression": { "Expression": { "Expression": { @@ -469,13 +469,13 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 2, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" }, "RightExpression": { "Expression": { @@ -484,22 +484,22 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 2, - "Kind": 11 + "Kind": "TupleItemRef" }, "Index": 1, - "Kind": 11 + "Kind": "TupleItemRef" }, - "Kind": 2 + "Kind": "BinaryOperator" }, - "Kind": 6 + "Kind": "Mux" } } ], "ObjectKind": "Object", - "Kind": 7 + "Kind": "ObjectCreate" } }, { @@ -514,10 +514,10 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 0, - "Kind": 11 + "Kind": "TupleItemRef" } }, { @@ -528,22 +528,22 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": 14 + "Kind": "VariableRef" }, "Index": 3, - "Kind": 11 + "Kind": "TupleItemRef" } } ], "ObjectKind": "Object", - "Kind": 7 + "Kind": "ObjectCreate" } } ], "ObjectKind": "Object", - "Kind": 7 + "Kind": "ObjectCreate" }, - "Kind": 6 + "Kind": "Select" } } @@ -559,13 +559,13 @@ "SourceExpression": { "SourceExpression": { "Name": "root", - "Kind": 3 + "Kind": "Input" }, "Aggregate": { - "OperatorKind": 8, - "Kind": 0 + "OperatorKind": "Sum", + "Kind": "Builtin" }, - "Kind": 0 + "Kind": "Aggregate" }, "DeclaredVariable": { "Name": "v0", @@ -576,29 +576,29 @@ { "Name": "count_a_plus_five", "Expression": { - "OperatorKind": 0, + "OperatorKind": "Add", "LeftExpression": { "Variable": { "Name": "v0", "UniqueId": 6 }, - "Kind": 14 + "Kind": "VariableRef" }, "RightExpression": { "Literal": { "Value": 5, - "Kind": 4 + "Kind": "Number" }, - "Kind": 5 + "Kind": "Literal" }, - "Kind": 2 + "Kind": "BinaryOperator" } } ], "ObjectKind": "Object", - "Kind": 7 + "Kind": "ObjectCreate" }, - "Kind": 6 + "Kind": "Select" } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/PartitionKeyHashBaselineTest.Lists.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/PartitionKeyHashBaselineTest.Lists.xml index 3f7faa9f26..1d9e1162bb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/PartitionKeyHashBaselineTest.Lists.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/PartitionKeyHashBaselineTest.Lists.xml @@ -1,32 +1,32 @@  - - - 1 Path List - ["/path1"] - - - 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05 - B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12 - - - - - 2 Path List - ["/path1","/path2"] - - - 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05-00-00-00-00-00-00-00-00-00-00-00-00-C9-1E-F0-78 - B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12-A6-0C-6C-BE-5A-2D-38-6E-5D-AE-1A-AC-94-21-6B-6C - - - - - 3 Path List - ["/path1","/path2","/path3"] - - - 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05-00-00-00-00-00-00-00-00-00-00-00-00-C9-1E-F0-78-00-00-00-00-00-00-00-00-00-00-00-00-9A-B4-68-CD - B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12-A6-0C-6C-BE-5A-2D-38-6E-5D-AE-1A-AC-94-21-6B-6C-88-A6-18-5D-2D-D5-1C-96-D0-47-75-B7-2E-FA-BE-08 - - + + + 1 Path List + ["/path1"] + + + 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05 + B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12 + + + + + 2 Path List + ["/path1","/path2"] + + + 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05-00-00-00-00-00-00-00-00-00-00-00-00-C9-1E-F0-78 + B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12-A6-0C-6C-BE-5A-2D-38-6E-5D-AE-1A-AC-94-21-6B-6C + + + + + 3 Path List + ["/path1","/path2","/path3"] + + + 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05-00-00-00-00-00-00-00-00-00-00-00-00-C9-1E-F0-78-00-00-00-00-00-00-00-00-00-00-00-00-9A-B4-68-CD + B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12-A6-0C-6C-BE-5A-2D-38-6E-5D-AE-1A-AC-94-21-6B-6C-88-A6-18-5D-2D-D5-1C-96-D0-47-75-B7-2E-FA-BE-08 + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index dde2d208bc..1ce128da52 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -460,59 +460,8 @@ }, "NestedTypes": {} }, - "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { - "Subclasses": {}, - "Members": { - "Boolean EnableOptimisticDirectExecution": { - "Type": "Property", - "Attributes": [], - "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { - "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], - "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { - "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], - "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - } - }, - "NestedTypes": {} - }, "Microsoft.Azure.Cosmos.RequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { - "Subclasses": { - "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { - "Subclasses": {}, - "Members": { - "Boolean EnableOptimisticDirectExecution": { - "Type": "Property", - "Attributes": [], - "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { - "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], - "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { - "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], - "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - } - }, - "NestedTypes": {} - } - }, + "Subclasses": {}, "Members": { "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 46bdf1c170..4f957a118b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -6439,6 +6439,18 @@ "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { + "Boolean EnableOptimisticDirectExecution": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": { "Type": "Property", "Attributes": [], @@ -6593,6 +6605,13 @@ ], "MethodInfo": "Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Void set_EnableScanInQuery(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", "Attributes": [ @@ -7466,6 +7485,18 @@ "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { + "Boolean EnableOptimisticDirectExecution": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": { "Type": "Property", "Attributes": [], @@ -7620,6 +7651,13 @@ ], "MethodInfo": "Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Void set_EnableScanInQuery(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", "Attributes": [ From 2fe547171a5e795801c3cd40372ba03885e195cf Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Wed, 3 Jan 2024 16:08:47 -0500 Subject: [PATCH 04/25] adds multihash test cases --- .../CosmosMultiHashTest.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 a36c2de75d..c748fdad18 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -422,7 +422,9 @@ public async Task MultiHashReplaceItemTest() } [TestMethod] - public async Task MultiHashQueryItemTest() + [DataRow(true)] + [DataRow(false)] + public async Task MultiHashQueryItemTest(bool odeEnabled) { Cosmos.PartitionKey pKey; Cosmos.PartitionKey badPKey; @@ -464,7 +466,7 @@ public async Task MultiHashQueryItemTest() using (FeedIterator feedIterator = this.container.GetItemQueryIterator( query, null, - new QueryRequestOptions() { EnableOptimisticDirectExecution = true, PartitionKey = pKey })) + new QueryRequestOptions() { EnableOptimisticDirectExecution = odeEnabled, PartitionKey = pKey })) { Assert.IsTrue(feedIterator.HasMoreResults); @@ -481,7 +483,7 @@ public async Task MultiHashQueryItemTest() using (FeedIterator feedIterator = this.container.GetItemQueryIterator( query, null, - new QueryRequestOptions() { EnableOptimisticDirectExecution = true, PartitionKey = pKey })) + new QueryRequestOptions() { EnableOptimisticDirectExecution = odeEnabled, PartitionKey = pKey })) { Assert.IsTrue(feedIterator.HasMoreResults); @@ -495,7 +497,7 @@ public async Task MultiHashQueryItemTest() using (FeedIterator badFeedIterator = this.container.GetItemQueryIterator( query, null, - new QueryRequestOptions() { EnableOptimisticDirectExecution = true, PartitionKey = badPKey})) + new QueryRequestOptions() { EnableOptimisticDirectExecution = odeEnabled, PartitionKey = badPKey})) { FeedResponse queryDocBad = await badFeedIterator.ReadNextAsync(); Assert.ThrowsException(() => From f1aae847c2fb7039b7a82c60c9611d68f3fdc757 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Wed, 3 Jan 2024 15:15:50 -0800 Subject: [PATCH 05/25] Updated client serialization test output --- ...tClientDistributionPlanDeserialization.xml | 272 +++++++++--------- 1 file changed, 136 insertions(+), 136 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ClientDistributionPlanBaselineTests.TestClientDistributionPlanDeserialization.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ClientDistributionPlanBaselineTests.TestClientDistributionPlanDeserialization.xml index 6b4c4a69cb..c59b58aef1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ClientDistributionPlanBaselineTests.TestClientDistributionPlanDeserialization.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ClientDistributionPlanBaselineTests.TestClientDistributionPlanDeserialization.xml @@ -8,7 +8,7 @@ { "Cql": { "Name": "root", - "Kind": "Input" + "Kind": 3 } } @@ -24,13 +24,13 @@ "SourceExpression": { "SourceExpression": { "Name": "root", - "Kind": "Input" + "Kind": 3 }, "Aggregate": { - "OperatorKind": "Sum", - "Kind": "Builtin" + "OperatorKind": 8, + "Kind": 0 }, - "Kind": "Aggregate" + "Kind": 0 }, "DeclaredVariable": { "Name": "v0", @@ -45,14 +45,14 @@ "Name": "v0", "UniqueId": 6 }, - "Kind": "VariableRef" + "Kind": 14 } } ], "ObjectKind": "Object", - "Kind": "ObjectCreate" + "Kind": 7 }, - "Kind": "Select" + "Kind": 6 } } @@ -69,7 +69,7 @@ "SourceExpression": { "SourceExpression": { "Name": "root", - "Kind": "Input" + "Kind": 3 }, "DeclaredVariable": { "Name": "v0", @@ -83,16 +83,16 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 }, { "ConditionExpression": { - "OperatorKind": "And", + "OperatorKind": 1, "LeftExpression": { - "OperatorKind": "NotEqual", + "OperatorKind": 14, "LeftExpression": { "Expression": { "Expression": { @@ -100,27 +100,27 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 }, "RightExpression": { "Literal": { "Value": 0, - "Kind": "Number" + "Kind": 4 }, - "Kind": "Literal" + "Kind": 5 }, - "Kind": "BinaryOperator" + "Kind": 2 }, "RightExpression": { - "OperatorKind": "Not", + "OperatorKind": 2, "Expression": { - "FunctionKind": "Is_Defined", + "FunctionKind": 55, "Arguments": [ { "Expression": { @@ -129,27 +129,27 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 } ], - "Kind": "SystemFunctionCall" + "Kind": 9 }, - "Kind": "UnaryOperator" + "Kind": 12 }, - "Kind": "BinaryOperator" + "Kind": 2 }, "LeftExpression": { "Literal": { "Items": [], - "Kind": "Array" + "Kind": 1 }, - "Kind": "Literal" + "Kind": 5 }, "RightExpression": { "Expression": { @@ -158,23 +158,23 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 }, - "Kind": "Mux" + "Kind": 6 }, { "Items": [ { "ConditionExpression": { - "OperatorKind": "And", + "OperatorKind": 1, "LeftExpression": { - "OperatorKind": "NotEqual", + "OperatorKind": 14, "LeftExpression": { "Expression": { "Expression": { @@ -183,30 +183,30 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 2, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 }, "RightExpression": { "Literal": { "Value": 0, - "Kind": "Number" + "Kind": 4 }, - "Kind": "Literal" + "Kind": 5 }, - "Kind": "BinaryOperator" + "Kind": 2 }, "RightExpression": { - "OperatorKind": "Not", + "OperatorKind": 2, "Expression": { - "FunctionKind": "Is_Defined", + "FunctionKind": 55, "Arguments": [ { "Expression": { @@ -216,30 +216,30 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 2, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 } ], - "Kind": "SystemFunctionCall" + "Kind": 9 }, - "Kind": "UnaryOperator" + "Kind": 12 }, - "Kind": "BinaryOperator" + "Kind": 2 }, "LeftExpression": { "Literal": { "Items": [], - "Kind": "Array" + "Kind": 1 }, - "Kind": "Literal" + "Kind": 5 }, "RightExpression": { "Expression": { @@ -248,15 +248,15 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 2, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 }, - "Kind": "Mux" + "Kind": 6 }, { "Expression": { @@ -265,22 +265,22 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 2, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 } ], - "Kind": "TupleCreate" + "Kind": 10 }, { "ConditionExpression": { - "OperatorKind": "And", + "OperatorKind": 1, "LeftExpression": { - "OperatorKind": "NotEqual", + "OperatorKind": 14, "LeftExpression": { "Expression": { "Expression": { @@ -288,27 +288,27 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 3, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 }, "RightExpression": { "Literal": { "Value": 0, - "Kind": "Number" + "Kind": 4 }, - "Kind": "Literal" + "Kind": 5 }, - "Kind": "BinaryOperator" + "Kind": 2 }, "RightExpression": { - "OperatorKind": "Not", + "OperatorKind": 2, "Expression": { - "FunctionKind": "Is_Defined", + "FunctionKind": 55, "Arguments": [ { "Expression": { @@ -317,27 +317,27 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 3, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 } ], - "Kind": "SystemFunctionCall" + "Kind": 9 }, - "Kind": "UnaryOperator" + "Kind": 12 }, - "Kind": "BinaryOperator" + "Kind": 2 }, "LeftExpression": { "Literal": { "Items": [], - "Kind": "Array" + "Kind": 1 }, - "Kind": "Literal" + "Kind": 5 }, "RightExpression": { "Expression": { @@ -346,46 +346,46 @@ "Name": "v0", "UniqueId": 16 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 3, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 }, - "Kind": "Mux" + "Kind": 6 } ], - "Kind": "TupleCreate" + "Kind": 10 }, - "Kind": "Select" + "Kind": 6 }, "KeyCount": 1, "Aggregates": [ { - "OperatorKind": "Sum", - "Kind": "Builtin" + "OperatorKind": 8, + "Kind": 0 }, { "Items": [ { - "OperatorKind": "Sum", - "Kind": "Builtin" + "OperatorKind": 8, + "Kind": 0 }, { - "OperatorKind": "Sum", - "Kind": "Builtin" + "OperatorKind": 8, + "Kind": 0 } ], - "Kind": "Tuple" + "Kind": 1 }, { - "OperatorKind": "Max", - "Kind": "Builtin" + "OperatorKind": 6, + "Kind": 0 } ], - "Kind": "GroupBy" + "Kind": 2 }, "DeclaredVariable": { "Name": "v0", @@ -405,10 +405,10 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 } }, { @@ -419,17 +419,17 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 } }, { "Name": "FieldAvg", "Expression": { "ConditionExpression": { - "OperatorKind": "Equal", + "OperatorKind": 6, "LeftExpression": { "Expression": { "Expression": { @@ -437,31 +437,31 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 2, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 }, "RightExpression": { "Literal": { "Value": 0, - "Kind": "Number" + "Kind": 4 }, - "Kind": "Literal" + "Kind": 5 }, - "Kind": "BinaryOperator" + "Kind": 2 }, "LeftExpression": { "Literal": { - "Kind": "Undefined" + "Kind": 0 }, - "Kind": "Literal" + "Kind": 5 }, "RightExpression": { - "OperatorKind": "Divide", + "OperatorKind": 5, "LeftExpression": { "Expression": { "Expression": { @@ -469,13 +469,13 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 2, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 }, "RightExpression": { "Expression": { @@ -484,22 +484,22 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 2, - "Kind": "TupleItemRef" + "Kind": 11 }, "Index": 1, - "Kind": "TupleItemRef" + "Kind": 11 }, - "Kind": "BinaryOperator" + "Kind": 2 }, - "Kind": "Mux" + "Kind": 6 } } ], "ObjectKind": "Object", - "Kind": "ObjectCreate" + "Kind": 7 } }, { @@ -514,10 +514,10 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 0, - "Kind": "TupleItemRef" + "Kind": 11 } }, { @@ -528,22 +528,22 @@ "Name": "v0", "UniqueId": 10 }, - "Kind": "VariableRef" + "Kind": 14 }, "Index": 3, - "Kind": "TupleItemRef" + "Kind": 11 } } ], "ObjectKind": "Object", - "Kind": "ObjectCreate" + "Kind": 7 } } ], "ObjectKind": "Object", - "Kind": "ObjectCreate" + "Kind": 7 }, - "Kind": "Select" + "Kind": 6 } } @@ -559,13 +559,13 @@ "SourceExpression": { "SourceExpression": { "Name": "root", - "Kind": "Input" + "Kind": 3 }, "Aggregate": { - "OperatorKind": "Sum", - "Kind": "Builtin" + "OperatorKind": 8, + "Kind": 0 }, - "Kind": "Aggregate" + "Kind": 0 }, "DeclaredVariable": { "Name": "v0", @@ -576,29 +576,29 @@ { "Name": "count_a_plus_five", "Expression": { - "OperatorKind": "Add", + "OperatorKind": 0, "LeftExpression": { "Variable": { "Name": "v0", "UniqueId": 6 }, - "Kind": "VariableRef" + "Kind": 14 }, "RightExpression": { "Literal": { "Value": 5, - "Kind": "Number" + "Kind": 4 }, - "Kind": "Literal" + "Kind": 5 }, - "Kind": "BinaryOperator" + "Kind": 2 } } ], "ObjectKind": "Object", - "Kind": "ObjectCreate" + "Kind": 7 }, - "Kind": "Select" + "Kind": 6 } } From 492425c35a32b84dd6022b03f5882c844c4b12ee Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Thu, 4 Jan 2024 11:10:21 -0800 Subject: [PATCH 06/25] Updated OffsetLimitPageSize() test --- .../Query/Pipeline/FullPipelineTests.cs | 110 +++++++++--------- 1 file changed, 53 insertions(+), 57 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs index ce2d808304..c576f7a0f4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs @@ -270,11 +270,11 @@ public async Task OffsetLimitPageSize() DocumentContainer documentContainer = await CreateDocumentContainerAsync(documents, mockInMemoryContainer, numSplits: 4); // OFFSET/LIMIT with ORDER BY - await this.TestPageSizeAsync("SELECT c.pk FROM c ORDER BY c.pk OFFSET 0 LIMIT 500", expectedPageSize: 315, expectedResults: 500, mockInMemoryContainer, documentContainer); + await this.TestPageSizeAsync("SELECT c.pk FROM c ORDER BY c.pk OFFSET 0 LIMIT 500", expectedPageSize: 500, expectedResults: 500, mockInMemoryContainer, documentContainer); await this.TestPageSizeAsync("SELECT c.pk FROM c ORDER BY c.pk OFFSET 10000 LIMIT 5000", expectedPageSize: 1000, expectedResults: 0, mockInMemoryContainer, documentContainer); - await this.TestPageSizeAsync("SELECT c.pk FROM c ORDER BY c.pk OFFSET 10 LIMIT 100", expectedPageSize: 70, expectedResults: 100, mockInMemoryContainer, documentContainer); - await this.TestPageSizeAsync("SELECT c.pk FROM c ORDER BY c.pk OFFSET 0 LIMIT 100", expectedPageSize: 65, expectedResults: 100, mockInMemoryContainer, documentContainer); - await this.TestPageSizeAsync("SELECT c.pk FROM c ORDER BY c.pk OFFSET 100 LIMIT 0", expectedPageSize: 65, expectedResults: 0, mockInMemoryContainer, documentContainer); + await this.TestPageSizeAsync("SELECT c.pk FROM c ORDER BY c.pk OFFSET 10 LIMIT 100", expectedPageSize: 110, expectedResults: 100, mockInMemoryContainer, documentContainer); + await this.TestPageSizeAsync("SELECT c.pk FROM c ORDER BY c.pk OFFSET 0 LIMIT 100", expectedPageSize: 100, expectedResults: 100, mockInMemoryContainer, documentContainer); + await this.TestPageSizeAsync("SELECT c.pk FROM c ORDER BY c.pk OFFSET 100 LIMIT 0", expectedPageSize: 1000, expectedResults: 0, mockInMemoryContainer, documentContainer); // OFFSET/LIMIT without ORDER BY await this.TestPageSizeAsync("SELECT c.pk FROM c OFFSET 10 LIMIT 100", expectedPageSize: 1000, expectedResults: 100, mockInMemoryContainer, documentContainer); @@ -283,7 +283,7 @@ public async Task OffsetLimitPageSize() // TOP with ORDER BY await this.TestPageSizeAsync("SELECT TOP 5 c.pk FROM c ORDER BY c.pk", expectedPageSize: 5, expectedResults: 5, mockInMemoryContainer, documentContainer); - await this.TestPageSizeAsync("SELECT TOP 100 c.pk FROM c ORDER BY c.pk", expectedPageSize: 65, expectedResults: 100, mockInMemoryContainer, documentContainer); + await this.TestPageSizeAsync("SELECT TOP 100 c.pk FROM c ORDER BY c.pk", expectedPageSize: 100, expectedResults: 100, mockInMemoryContainer, documentContainer); await this.TestPageSizeAsync("SELECT TOP 5000 c.pk FROM c ORDER BY c.pk", expectedPageSize: 1000, expectedResults: 1100, mockInMemoryContainer, documentContainer); await this.TestPageSizeAsync("SELECT TOP 15000 c.pk FROM c ORDER BY c.pk", expectedPageSize: 1000, expectedResults: 1100, mockInMemoryContainer, documentContainer); @@ -346,67 +346,63 @@ private async Task TestPageSizeAsync(string query, int expectedPageSize, int exp testInjections: queryRequestOptions.TestSettings); string databaseId = "db1234"; - string resourceLink = $"dbs/{databaseId}/colls"; + (PartitionedQueryExecutionInfo partitionedQueryExecutionInfo, QueryPartitionProvider queryPartitionProvider) = GetPartitionedQueryExecutionInfoAndPartitionProvider(sqlQuerySpecJsonString, partitionKeyDefinition); - const string suffix = "-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF"; + CosmosQueryContextCore cosmosQueryContextCore = new CosmosQueryContextCore( + client: new TestCosmosQueryClient(queryPartitionProvider), + resourceTypeEnum: Documents.ResourceType.Document, + operationType: Documents.OperationType.Query, + resourceType: typeof(QueryResponseCore), + resourceLink: $"dbs/{databaseId}/colls", + isContinuationExpected: true, + allowNonValueAggregateQuery: true, + useSystemPrefix: false, + correlatedActivityId: Guid.NewGuid()); - List partitionKeyRanges = new List - { - new PartitionKeyRange() { MinInclusive = Documents.Routing.PartitionKeyInternal.MinimumInclusiveEffectivePartitionKey, MaxExclusive = "1F" + suffix }, - new PartitionKeyRange() { MinInclusive = "1F" + suffix, MaxExclusive = "3F" + suffix }, - new PartitionKeyRange() { MinInclusive = "3F" + suffix, MaxExclusive = "5F" + suffix }, - new PartitionKeyRange() { MinInclusive = "5F" + suffix, MaxExclusive = "7F" + suffix }, - new PartitionKeyRange() { MinInclusive = "7F" + suffix, MaxExclusive = "9F" + suffix }, - new PartitionKeyRange() { MinInclusive = "9F" + suffix, MaxExclusive = "BF" + suffix }, - new PartitionKeyRange() { MinInclusive = "BF" + suffix, MaxExclusive = "DF" + suffix }, - new PartitionKeyRange() { MinInclusive = "DF" + suffix, MaxExclusive = Documents.Routing.PartitionKeyInternal.MaximumExclusiveEffectivePartitionKey }, + return Tuple.Create(inputParameters, cosmosQueryContextCore); + } + + internal static Tuple GetPartitionedQueryExecutionInfoAndPartitionProvider(string querySpecJsonString, PartitionKeyDefinition pkDefinition) + { + IDictionary DefaultQueryengineConfiguration = new Dictionary() + { + {"maxSqlQueryInputLength", 30720}, + {"maxJoinsPerSqlQuery", 5}, + {"maxLogicalAndPerSqlQuery", 200}, + {"maxLogicalOrPerSqlQuery", 200}, + {"maxUdfRefPerSqlQuery", 2}, + {"maxInExpressionItemsCount", 8000}, + {"queryMaxInMemorySortDocumentCount", 500}, + {"maxQueryRequestTimeoutFraction", 0.90}, + {"sqlAllowNonFiniteNumbers", false}, + {"sqlAllowAggregateFunctions", true}, + {"sqlAllowSubQuery", true}, + {"sqlAllowScalarSubQuery", false}, + {"allowNewKeywords", true}, + {"sqlAllowLike", true}, + {"sqlAllowGroupByClause", false}, + {"queryEnableMongoNativeRegex", true}, + {"maxSpatialQueryCells", 12}, + {"spatialMaxGeometryPointCount", 256}, + {"sqlDisableOptimizationFlags", 0}, + {"sqlEnableParameterExpansionCheck", true} }; - Mock mockClient = new Mock(); - - mockClient.Setup(x => x.GetTargetPartitionKeyRangesAsync( - It.IsAny(), - It.IsAny(), - It.IsAny>>(), - It.IsAny(), - It.IsAny())) - .Returns((string resourceLink, string collectionResourceId, IReadOnlyList> providedRanges, bool forceRefresh, ITrace trace) => Task.FromResult(partitionKeyRanges)); - - mockClient.Setup(x => x.TryGetPartitionedQueryExecutionInfoAsync( - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny(), - It.IsAny())) - .Returns((SqlQuerySpec sqlQuerySpec, ResourceType resourceType, PartitionKeyDefinition partitionKeyDefinition, bool requireFormattableOrderByQuery, bool isContinuationExpected, bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, bool useSystemPrefix, Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken) => - { - CosmosSerializerCore serializerCore = new(); - using StreamReader streamReader = new(serializerCore.ToStreamSqlQuerySpec(sqlQuerySpec, Documents.ResourceType.Document)); - string sqlQuerySpecJsonString = streamReader.ReadToEnd(); + QueryPartitionProvider queryPartitionProvider = new QueryPartitionProvider(DefaultQueryengineConfiguration); - (PartitionedQueryExecutionInfo partitionedQueryExecutionInfo, QueryPartitionProvider queryPartitionProvider) = OptimisticDirectExecutionQueryBaselineTests.GetPartitionedQueryExecutionInfoAndPartitionProvider(sqlQuerySpecJsonString, partitionKeyDefinition); - return Task.FromResult(TryCatch.FromResult(partitionedQueryExecutionInfo)); - } - ); - - CosmosQueryContextCore cosmosQueryContextCore = new CosmosQueryContextCore( - client: mockClient.Object, - resourceTypeEnum: Documents.ResourceType.Document, - operationType: Documents.OperationType.Query, - resourceType: typeof(QueryResponseCore), - resourceLink: resourceLink, + TryCatch tryGetQueryPlan = queryPartitionProvider.TryGetPartitionedQueryExecutionInfo( + querySpecJsonString: querySpecJsonString, + partitionKeyDefinition: pkDefinition, + requireFormattableOrderByQuery: true, isContinuationExpected: true, allowNonValueAggregateQuery: true, + hasLogicalPartitionKey: false, + allowDCount: true, useSystemPrefix: false, - correlatedActivityId: Guid.NewGuid()); + geospatialType: Cosmos.GeospatialType.Geography); - return Tuple.Create(inputParameters, cosmosQueryContextCore); + PartitionedQueryExecutionInfo partitionedQueryExecutionInfo = tryGetQueryPlan.Succeeded ? tryGetQueryPlan.Result : throw tryGetQueryPlan.Exception; + return Tuple.Create(partitionedQueryExecutionInfo, queryPartitionProvider); } internal static async Task> ExecuteQueryAsync( From 255d13b5268cdfc4c8ef6569ca66cbb5bfd531cb Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Thu, 4 Jan 2024 13:28:16 -0800 Subject: [PATCH 07/25] Revert changes to Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/PartitionKeyHashBaselineTest.Lists.xml --- .../PartitionKeyHashBaselineTest.Lists.xml | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/PartitionKeyHashBaselineTest.Lists.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/PartitionKeyHashBaselineTest.Lists.xml index 1d9e1162bb..3f7faa9f26 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/PartitionKeyHashBaselineTest.Lists.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/PartitionKeyHashBaselineTest.Lists.xml @@ -1,32 +1,32 @@  - - - 1 Path List - ["/path1"] - - - 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05 - B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12 - - - - - 2 Path List - ["/path1","/path2"] - - - 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05-00-00-00-00-00-00-00-00-00-00-00-00-C9-1E-F0-78 - B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12-A6-0C-6C-BE-5A-2D-38-6E-5D-AE-1A-AC-94-21-6B-6C - - - - - 3 Path List - ["/path1","/path2","/path3"] - - - 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05-00-00-00-00-00-00-00-00-00-00-00-00-C9-1E-F0-78-00-00-00-00-00-00-00-00-00-00-00-00-9A-B4-68-CD - B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12-A6-0C-6C-BE-5A-2D-38-6E-5D-AE-1A-AC-94-21-6B-6C-88-A6-18-5D-2D-D5-1C-96-D0-47-75-B7-2E-FA-BE-08 - - + + + 1 Path List + ["/path1"] + + + 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05 + B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12 + + + + + 2 Path List + ["/path1","/path2"] + + + 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05-00-00-00-00-00-00-00-00-00-00-00-00-C9-1E-F0-78 + B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12-A6-0C-6C-BE-5A-2D-38-6E-5D-AE-1A-AC-94-21-6B-6C + + + + + 3 Path List + ["/path1","/path2","/path3"] + + + 00-00-00-00-00-00-00-00-00-00-00-00-0A-A1-CC-05-00-00-00-00-00-00-00-00-00-00-00-00-C9-1E-F0-78-00-00-00-00-00-00-00-00-00-00-00-00-9A-B4-68-CD + B6-3D-B6-C4-3A-4F-1B-01-4C-63-B0-C2-E6-28-E8-12-A6-0C-6C-BE-5A-2D-38-6E-5D-AE-1A-AC-94-21-6B-6C-88-A6-18-5D-2D-D5-1C-96-D0-47-75-B7-2E-FA-BE-08 + + \ No newline at end of file From f4514dbe3fe6b5789a5f9824727d614a51cefe4d Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Thu, 4 Jan 2024 15:44:02 -0800 Subject: [PATCH 08/25] Updated EndToEndTraceWriterBaselineTests.ReadManyAsync baseline test --- ...TraceWriterBaselineTests.ReadManyAsync.xml | 1010 +++++++++-------- 1 file changed, 520 insertions(+), 490 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index af2afbcb73..d278d397cc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -28,37 +28,38 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── Prefetch(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Query Metrics] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ │ ( - │ │ │ [System Info] - │ │ │ Redacted To Not Change The Baselines From Run To Run - │ │ │ ) - │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Client Side Request Stats] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── [05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Query Metrics] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ │ ( + │ │ │ [System Info] + │ │ │ Redacted To Not Change The Baselines From Run To Run + │ │ │ ) + │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Client Side Request Stats] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds ├── Execute query for a partitionkeyrange(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [Query Correlated ActivityId] @@ -68,37 +69,38 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── Prefetch(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Query Metrics] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ │ ( - │ │ │ [System Info] - │ │ │ Redacted To Not Change The Baselines From Run To Run - │ │ │ ) - │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Client Side Request Stats] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Query Metrics] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ │ ( + │ │ │ [System Info] + │ │ │ Redacted To Not Change The Baselines From Run To Run + │ │ │ ) + │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Client Side Request Stats] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds └── Execute query for a partitionkeyrange(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds │ ( │ [Query Correlated ActivityId] @@ -108,37 +110,38 @@ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - └── [05C1E7FFFFFFFA,FF) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - └── Prefetch(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - └── [05C1E7FFFFFFFA,FF) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ ( - │ [Query Metrics] - │ Redacted To Not Change The Baselines From Run To Run - │ ) - ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [System Info] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ ( - │ [Client Side Request Stats] - │ Redacted To Not Change The Baselines From Run To Run - │ ) - └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds + ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + └── [05C1E7FFFFFFFA,FF) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds + │ ( + │ [Query Metrics] + │ Redacted To Not Change The Baselines From Run To Run + │ ) + ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [System Info] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ ( + │ [Client Side Request Stats] + │ Redacted To Not Change The Baselines From Run To Run + │ ) + └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds ]]> containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -587,7 +602,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -625,37 +640,38 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── Prefetch(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Query Metrics] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ │ ( - │ │ │ [System Info] - │ │ │ Redacted To Not Change The Baselines From Run To Run - │ │ │ ) - │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Client Side Request Stats] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── [05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Query Metrics] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ │ ( + │ │ │ [System Info] + │ │ │ Redacted To Not Change The Baselines From Run To Run + │ │ │ ) + │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Client Side Request Stats] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds ├── Execute query for a partitionkeyrange(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [Query Correlated ActivityId] @@ -665,37 +681,38 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── Prefetch(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Query Metrics] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ │ ( - │ │ │ [System Info] - │ │ │ Redacted To Not Change The Baselines From Run To Run - │ │ │ ) - │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Client Side Request Stats] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Query Metrics] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ │ ( + │ │ │ [System Info] + │ │ │ Redacted To Not Change The Baselines From Run To Run + │ │ │ ) + │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Client Side Request Stats] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds ├── Execute query for a partitionkeyrange(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [Query Correlated ActivityId] @@ -705,37 +722,38 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [05C1E7FFFFFFFA,FF) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── Prefetch(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ └── [05C1E7FFFFFFFA,FF) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Query Metrics] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ │ ( - │ │ │ [System Info] - │ │ │ Redacted To Not Change The Baselines From Run To Run - │ │ │ ) - │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ ( - │ │ [Client Side Request Stats] - │ │ Redacted To Not Change The Baselines From Run To Run - │ │ ) - │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── [05C1E7FFFFFFFA,FF) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Query Metrics] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ │ ( + │ │ │ [System Info] + │ │ │ Redacted To Not Change The Baselines From Run To Run + │ │ │ ) + │ │ └── Microsoft.Azure.Cosmos.Handlers.TelemetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ ( + │ │ [Client Side Request Stats] + │ │ Redacted To Not Change The Baselines From Run To Run + │ │ ) + │ └── Get Cosmos Element Response(00000000-0000-0000-0000-000000000000) Json-Component 00:00:00:000 0.00 milliseconds ├── Query Response Serialization(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds ├── Query Response Serialization(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds └── Query Response Serialization(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds @@ -775,6 +793,22 @@ "name": "Service Interop Query Plan", "duration in milliseconds": 0 }, + { + "name": "Get Overlapping Feed Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + } + ] + }, { "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, @@ -794,95 +828,83 @@ ] }, { - "name": "MoveNextAsync", + "name": "Get Partition Key Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Prefetching", + "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 - }, + } + ] + }, + { + "name": "[05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next", + "duration in milliseconds": 0, + "data": { + "Query Metrics": "Redacted To Not Change The Baselines From Run To Run" + }, + "children": [ { - "name": "[05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next", + "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler", "duration in milliseconds": 0, "children": [ { - "name": "Prefetch", + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, + { + "name": "Get Partition Key Range Cache", + "duration in milliseconds": 0 + }, + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + }, + { + "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, + "data": { + "System Info": "Redacted To Not Change The Baselines From Run To Run" + }, "children": [ { - "name": "[05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next", + "name": "Microsoft.Azure.Cosmos.Handlers.TelemetryHandler", "duration in milliseconds": 0, - "data": { - "Query Metrics": "Redacted To Not Change The Baselines From Run To Run" - }, "children": [ { - "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler", + "name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler", "duration in milliseconds": 0, "children": [ { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, - { - "name": "Get Partition Key Range Cache", - "duration in milliseconds": 0 - }, - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - }, - { - "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", + "name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler", "duration in milliseconds": 0, - "data": { - "System Info": "Redacted To Not Change The Baselines From Run To Run" - }, "children": [ { - "name": "Microsoft.Azure.Cosmos.Handlers.TelemetryHandler", + "name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler", "duration in milliseconds": 0, "children": [ { - "name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler", + "name": "Microsoft.Azure.Documents.ServerStoreModel Transport Request", "duration in milliseconds": 0, - "children": [ - { - "name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler", - "duration in milliseconds": 0, - "children": [ - { - "name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler", - "duration in milliseconds": 0, - "children": [ - { - "name": "Microsoft.Azure.Documents.ServerStoreModel Transport Request", - "duration in milliseconds": 0, - "data": { - "Client Side Request Stats": "Redacted To Not Change The Baselines From Run To Run" - } - } - ] - } - ] - } - ] + "data": { + "Client Side Request Stats": "Redacted To Not Change The Baselines From Run To Run" + } } ] } ] } ] - }, - { - "name": "Get Cosmos Element Response", - "duration in milliseconds": 0 } ] } ] } ] + }, + { + "name": "Get Cosmos Element Response", + "duration in milliseconds": 0 } ] } @@ -913,6 +935,22 @@ "name": "Service Interop Query Plan", "duration in milliseconds": 0 }, + { + "name": "Get Overlapping Feed Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + } + ] + }, { "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, @@ -932,95 +970,83 @@ ] }, { - "name": "MoveNextAsync", + "name": "Get Partition Key Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Prefetching", + "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 - }, + } + ] + }, + { + "name": "[,05C1CFFFFFFFF8) move next", + "duration in milliseconds": 0, + "data": { + "Query Metrics": "Redacted To Not Change The Baselines From Run To Run" + }, + "children": [ { - "name": "[,05C1CFFFFFFFF8) move next", + "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler", "duration in milliseconds": 0, "children": [ { - "name": "Prefetch", + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, + { + "name": "Get Partition Key Range Cache", + "duration in milliseconds": 0 + }, + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + }, + { + "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, + "data": { + "System Info": "Redacted To Not Change The Baselines From Run To Run" + }, "children": [ { - "name": "[,05C1CFFFFFFFF8) move next", + "name": "Microsoft.Azure.Cosmos.Handlers.TelemetryHandler", "duration in milliseconds": 0, - "data": { - "Query Metrics": "Redacted To Not Change The Baselines From Run To Run" - }, "children": [ { - "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler", + "name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler", "duration in milliseconds": 0, "children": [ { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, - { - "name": "Get Partition Key Range Cache", - "duration in milliseconds": 0 - }, - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - }, - { - "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", + "name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler", "duration in milliseconds": 0, - "data": { - "System Info": "Redacted To Not Change The Baselines From Run To Run" - }, "children": [ { - "name": "Microsoft.Azure.Cosmos.Handlers.TelemetryHandler", + "name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler", "duration in milliseconds": 0, "children": [ { - "name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler", + "name": "Microsoft.Azure.Documents.ServerStoreModel Transport Request", "duration in milliseconds": 0, - "children": [ - { - "name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler", - "duration in milliseconds": 0, - "children": [ - { - "name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler", - "duration in milliseconds": 0, - "children": [ - { - "name": "Microsoft.Azure.Documents.ServerStoreModel Transport Request", - "duration in milliseconds": 0, - "data": { - "Client Side Request Stats": "Redacted To Not Change The Baselines From Run To Run" - } - } - ] - } - ] - } - ] + "data": { + "Client Side Request Stats": "Redacted To Not Change The Baselines From Run To Run" + } } ] } ] } ] - }, - { - "name": "Get Cosmos Element Response", - "duration in milliseconds": 0 } ] } ] } ] + }, + { + "name": "Get Cosmos Element Response", + "duration in milliseconds": 0 } ] } @@ -1051,6 +1077,22 @@ "name": "Service Interop Query Plan", "duration in milliseconds": 0 }, + { + "name": "Get Overlapping Feed Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + } + ] + }, { "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, @@ -1070,95 +1112,83 @@ ] }, { - "name": "MoveNextAsync", + "name": "Get Partition Key Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Prefetching", + "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 - }, + } + ] + }, + { + "name": "[05C1E7FFFFFFFA,FF) move next", + "duration in milliseconds": 0, + "data": { + "Query Metrics": "Redacted To Not Change The Baselines From Run To Run" + }, + "children": [ { - "name": "[05C1E7FFFFFFFA,FF) move next", + "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler", "duration in milliseconds": 0, "children": [ { - "name": "Prefetch", + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, + { + "name": "Get Partition Key Range Cache", + "duration in milliseconds": 0 + }, + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + }, + { + "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, + "data": { + "System Info": "Redacted To Not Change The Baselines From Run To Run" + }, "children": [ { - "name": "[05C1E7FFFFFFFA,FF) move next", + "name": "Microsoft.Azure.Cosmos.Handlers.TelemetryHandler", "duration in milliseconds": 0, - "data": { - "Query Metrics": "Redacted To Not Change The Baselines From Run To Run" - }, "children": [ { - "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler", + "name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler", "duration in milliseconds": 0, "children": [ { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, - { - "name": "Get Partition Key Range Cache", - "duration in milliseconds": 0 - }, - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - }, - { - "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", + "name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler", "duration in milliseconds": 0, - "data": { - "System Info": "Redacted To Not Change The Baselines From Run To Run" - }, "children": [ { - "name": "Microsoft.Azure.Cosmos.Handlers.TelemetryHandler", + "name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler", "duration in milliseconds": 0, "children": [ { - "name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler", + "name": "Microsoft.Azure.Documents.ServerStoreModel Transport Request", "duration in milliseconds": 0, - "children": [ - { - "name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler", - "duration in milliseconds": 0, - "children": [ - { - "name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler", - "duration in milliseconds": 0, - "children": [ - { - "name": "Microsoft.Azure.Documents.ServerStoreModel Transport Request", - "duration in milliseconds": 0, - "data": { - "Client Side Request Stats": "Redacted To Not Change The Baselines From Run To Run" - } - } - ] - } - ] - } - ] + "data": { + "Client Side Request Stats": "Redacted To Not Change The Baselines From Run To Run" + } } ] } ] } ] - }, - { - "name": "Get Cosmos Element Response", - "duration in milliseconds": 0 } ] } ] } ] + }, + { + "name": "Get Cosmos Element Response", + "duration in milliseconds": 0 } ] } @@ -1186,7 +1216,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -1199,7 +1229,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB From 094e886df0b75d8e7a7823ea1d7b6b0b45179435 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Fri, 5 Jan 2024 10:03:47 -0800 Subject: [PATCH 09/25] Removed account details --- .../EndToEndTraceWriterBaselineTests.ReadManyAsync.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index d278d397cc..227dff19bc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -589,7 +589,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -602,7 +602,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -1216,7 +1216,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -1229,7 +1229,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB From cc1db8009980703bc22363556771ce699d0736ba Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Fri, 5 Jan 2024 15:45:00 -0800 Subject: [PATCH 10/25] Updated performance benchmark results --- .../Contracts/BenchmarkResults.json | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json index 8e45a72922..3b597d3367 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json @@ -4,28 +4,28 @@ "MockedItemBenchmark.CreateItem;[Type=OfT]": 36356, "MockedItemBenchmark.CreateItem;[Type=OfTCustom]": 36362, "MockedItemBenchmark.CreateItem;[Type=OfTWithClientTelemetryEnabled]": 36359.5, - "MockedItemBenchmark.CreateItem;[Type=OfTWithDiagnosticsToString]": 57472.25, - "MockedItemBenchmark.CreateItem;[Type=Stream]": 24673.25, - "MockedItemBenchmark.DeleteItemExists;[Type=OfT]": 32308.5, - "MockedItemBenchmark.DeleteItemExists;[Type=OfTCustom]": 32328, - "MockedItemBenchmark.DeleteItemExists;[Type=OfTWithClientTelemetryEnabled]": 32321.25, - "MockedItemBenchmark.DeleteItemExists;[Type=OfTWithDiagnosticsToString]": 53231.25, - "MockedItemBenchmark.DeleteItemExists;[Type=Stream]": 24696, + "MockedItemBenchmark.CreateItem;[Type=OfTWithDiagnosticsToString]": 58900.5, + "MockedItemBenchmark.CreateItem;[Type=Stream]": 25212.75, + "MockedItemBenchmark.DeleteItemExists;[Type=OfT]": 33015.25, + "MockedItemBenchmark.DeleteItemExists;[Type=OfTCustom]": 33007.75, + "MockedItemBenchmark.DeleteItemExists;[Type=OfTWithClientTelemetryEnabled]": 33015.75, + "MockedItemBenchmark.DeleteItemExists;[Type=OfTWithDiagnosticsToString]": 54402.75, + "MockedItemBenchmark.DeleteItemExists;[Type=Stream]": 25229.25, "MockedItemBenchmark.DeleteItemNotExists;[Type=OfT]": 42172.5, "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTCustom]": 42174.75, "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTWithClientTelemetryEnabled]": 42166.5, "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTWithDiagnosticsToString]": 63338, - "MockedItemBenchmark.DeleteItemNotExists;[Type=Stream]": 37610, - "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfT]": 13342232, - "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTCustom]": 13341058, - "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTWithClientTelemetryEnabled]": 13355160, - "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTWithDiagnosticsToString]": 13612338, + "MockedItemBenchmark.DeleteItemNotExists;[Type=Stream]": 38373.5, + "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfT]": 11988727, + "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTCustom]": 11988284.75, + "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTWithClientTelemetryEnabled]": 11988606.75, + "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTWithDiagnosticsToString]": 12198686.5, "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=Stream]": 5920952, "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfT]": 2241814, "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTCustom]": 2241810, "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTWithClientTelemetryEnabled]": 2244658, - "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTWithDiagnosticsToString]": 2310842, - "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=Stream]": 1005038, + "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTWithDiagnosticsToString]": 2251235.75, + "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=Stream]": 978459.25, "MockedItemBenchmark.ReadFeed;[Type=OfT]": 560692, "MockedItemBenchmark.ReadFeed;[Type=OfTCustom]": 555716, "MockedItemBenchmark.ReadFeed;[Type=OfTWithClientTelemetryEnabled]": 550898.25, @@ -44,13 +44,13 @@ "MockedItemBenchmark.UpdateItem;[Type=OfT]": 36591, "MockedItemBenchmark.UpdateItem;[Type=OfTCustom]": 36594.25, "MockedItemBenchmark.UpdateItem;[Type=OfTWithClientTelemetryEnabled]": 36587.25, - "MockedItemBenchmark.UpdateItem;[Type=OfTWithDiagnosticsToString]": 57649, - "MockedItemBenchmark.UpdateItem;[Type=Stream]": 24894.75, + "MockedItemBenchmark.UpdateItem;[Type=OfTWithDiagnosticsToString]": 59152, + "MockedItemBenchmark.UpdateItem;[Type=Stream]": 25428, "MockedItemBenchmark.UpsertItem;[Type=OfT]": 36577.25, "MockedItemBenchmark.UpsertItem;[Type=OfTCustom]": 36583.75, "MockedItemBenchmark.UpsertItem;[Type=OfTWithClientTelemetryEnabled]": 36578.5, - "MockedItemBenchmark.UpsertItem;[Type=OfTWithDiagnosticsToString]": 57732.5, - "MockedItemBenchmark.UpsertItem;[Type=Stream]": 24878.5, + "MockedItemBenchmark.UpsertItem;[Type=OfTWithDiagnosticsToString]": 59613, + "MockedItemBenchmark.UpsertItem;[Type=Stream]": 25445.5, "MockedItemBulkBenchmark.CreateItem;[Type=OfT]": 1196168, "MockedItemBulkBenchmark.CreateItem;[Type=OfTCustom]": 1195808, "MockedItemBulkBenchmark.CreateItem;[Type=OfTWithClientTelemetryEnabled]": 1235418, From 4fb4163a3ed0f25768c965152065130c104d67a5 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Tue, 9 Jan 2024 17:36:22 -0800 Subject: [PATCH 11/25] Set enableODE to true for some of the tests --- .../CosmosQueryExecutionContextFactory.cs | 2 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 439 +++++++++++++++--- .../CosmosBasicQueryTests.cs | 6 +- .../CosmosJsonSerializerTests.cs | 84 ++-- .../FeedToken/QueryFeedTokenTests.cs | 2 +- .../Query/SanityQueryTests.cs | 1 - .../EndToEndTraceWriterBaselineTests.cs | 2 +- 7 files changed, 441 insertions(+), 95 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index 01be3ffc83..3fcdfc45da 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -782,7 +782,7 @@ private static Documents.PartitionKeyDefinition GetPartitionKeyDefinition(InputP Debug.Assert(containerQueryProperties.ResourceId != null, "CosmosQueryExecutionContextFactory Assert!", "Container ResourceId cannot be null!"); List targetRanges; - if (partitionedQueryExecutionInfo != null) + if (partitionedQueryExecutionInfo != null || inputParameters.InitialFeedRange != null) { targetRanges = await CosmosQueryExecutionContextFactory.GetTargetPartitionKeyRangesAsync( cosmosQueryContext.QueryClient, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index eeb3c0d890..8eb22d4334 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -34,8 +34,12 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -49,6 +53,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -85,6 +90,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -121,6 +127,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -157,6 +164,7 @@ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [System Info] @@ -215,6 +223,26 @@ "duration in milliseconds": 0 } ] + }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + } + ] + }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 } ] }, @@ -257,6 +285,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -357,6 +389,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -457,6 +493,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -557,6 +597,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -623,7 +667,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -636,7 +680,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -646,7 +690,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -659,7 +703,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -669,7 +713,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -682,7 +726,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -692,7 +736,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -705,7 +749,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -755,8 +799,12 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -770,6 +818,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -807,6 +856,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -844,6 +894,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -881,6 +932,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -931,6 +983,16 @@ "name": "Service Interop Query Plan", "duration in milliseconds": 0 }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + }, { "name": "Get Partition Key Ranges", "duration in milliseconds": 0, @@ -943,6 +1005,16 @@ } ] }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + }, { "name": "MoveNextAsync", "duration in milliseconds": 0, @@ -982,6 +1054,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1086,6 +1162,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1190,6 +1270,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1294,6 +1378,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1364,7 +1452,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -1377,7 +1465,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -1387,7 +1475,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -1400,7 +1488,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -1410,7 +1498,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -1423,7 +1511,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -1433,7 +1521,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -1446,7 +1534,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -1497,8 +1585,12 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1512,6 +1604,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -1548,6 +1641,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -1584,6 +1678,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -1620,6 +1715,7 @@ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [System Info] @@ -1678,6 +1774,26 @@ "duration in milliseconds": 0 } ] + }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + } + ] + }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 } ] }, @@ -1720,6 +1836,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1820,6 +1940,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1920,6 +2044,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2020,6 +2148,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2086,7 +2218,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -2099,7 +2231,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -2109,7 +2241,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -2122,7 +2254,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -2132,7 +2264,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -2145,7 +2277,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -2155,7 +2287,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -2168,7 +2300,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -2219,8 +2351,12 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -2234,6 +2370,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -2271,6 +2408,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -2308,6 +2446,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -2345,6 +2484,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -2395,6 +2535,16 @@ "name": "Service Interop Query Plan", "duration in milliseconds": 0 }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + }, { "name": "Get Partition Key Ranges", "duration in milliseconds": 0, @@ -2407,6 +2557,16 @@ } ] }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + }, { "name": "MoveNextAsync", "duration in milliseconds": 0, @@ -2446,6 +2606,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2550,6 +2714,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2654,6 +2822,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2758,6 +2930,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2828,7 +3004,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -2841,7 +3017,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -2851,7 +3027,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -2864,7 +3040,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -2874,7 +3050,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -2887,7 +3063,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -2897,7 +3073,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -2910,7 +3086,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -2969,6 +3145,7 @@ │ │ │ Redacted To Not Change The Baselines From Run To Run │ │ │ ) │ │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -2985,8 +3162,12 @@ │ │ │ [PointOperationStatisticsTraceDatum] │ │ │ Redacted To Not Change The Baselines From Run To Run │ │ │ ) + │ │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -3000,6 +3181,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -3037,6 +3219,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -3074,6 +3257,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -3111,6 +3295,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -3168,6 +3353,10 @@ "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler", "duration in milliseconds": 0, "children": [ + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3220,6 +3409,26 @@ "duration in milliseconds": 0 } ] + }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + } + ] + }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 } ] }, @@ -3262,6 +3471,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3366,6 +3579,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3470,6 +3687,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3574,6 +3795,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3644,7 +3869,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -3657,7 +3882,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -3667,7 +3892,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -3680,7 +3905,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -3690,7 +3915,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -3703,7 +3928,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -3713,7 +3938,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -3726,7 +3951,7 @@ Some Value Some Value Some Value - South Central US + East US 2,East US 2 Microsoft.DocumentDB @@ -3779,9 +4004,14 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -3795,6 +4025,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -3831,6 +4062,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -3867,6 +4099,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -3903,6 +4136,7 @@ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [System Info] @@ -3967,6 +4201,32 @@ ] } ] + }, + { + "name": "Get Overlapping Feed Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + } + ] + } + ] + }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 } ] }, @@ -4009,6 +4269,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4109,6 +4373,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4209,6 +4477,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4309,6 +4581,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4375,7 +4651,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -4388,7 +4664,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -4398,7 +4674,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -4411,7 +4687,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -4421,7 +4697,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -4434,7 +4710,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -4444,7 +4720,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -4457,7 +4733,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -4510,9 +4786,14 @@ │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -4526,6 +4807,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -4563,6 +4845,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -4600,6 +4883,7 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -4637,6 +4921,7 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -4687,6 +4972,22 @@ "name": "Service Interop Query Plan", "duration in milliseconds": 0 }, + { + "name": "Get Overlapping Feed Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + } + ] + }, { "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, @@ -4705,6 +5006,16 @@ } ] }, + { + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] + }, { "name": "MoveNextAsync", "duration in milliseconds": 0, @@ -4744,6 +5055,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4848,6 +5163,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4952,6 +5271,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -5056,6 +5379,10 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, + { + "name": "Get Collection Cache", + "duration in milliseconds": 0 + }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -5126,7 +5453,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -5139,7 +5466,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -5149,7 +5476,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -5162,7 +5489,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -5172,7 +5499,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -5185,7 +5512,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB @@ -5195,7 +5522,7 @@ containerName cosmosdb Some Value - 127.0.0.1 + akotalwar-test2.documents-staging.windows-ppe.net Some Value Some Value Direct @@ -5208,7 +5535,7 @@ Some Value Some Value Some Value - South Central US + East US 2 Microsoft.DocumentDB diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs index 35e18bdbc5..4583028fa9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs @@ -240,7 +240,7 @@ public async Task QueryRequestRateTest(bool directMode) { MaxItemCount = 1, MaxConcurrency = 1, - EnableOptimisticDirectExecution = false + EnableOptimisticDirectExecution = true })) { while (feedIterator.HasMoreResults) @@ -269,7 +269,7 @@ public async Task QueryRequestRateTest(bool directMode) { MaxItemCount = 1, MaxConcurrency = 1, - EnableOptimisticDirectExecution = false + EnableOptimisticDirectExecution = true }); // First request should be a success @@ -814,7 +814,7 @@ public async Task TesOdeTokenCompatibilityWithNonOdePipeline() QueryRequestOptions newQueryRequestOptions = new QueryRequestOptions { MaxItemCount = 50, - EnableOptimisticDirectExecution = false + EnableOptimisticDirectExecution = true }; // use Continuation Token to create new iterator and use same trace diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs index d1431511ba..09e3ccfa0f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs @@ -94,44 +94,64 @@ public async Task TestQueryWithCustomJsonSerializer() Assert.AreEqual(1, toStreamCount, "parameter should use custom serializer"); Assert.AreEqual(0, fromStreamCount); - toStreamCount = 0; - fromStreamCount = 0; - - FeedIterator itemIterator = container.GetItemQueryIterator( - query, - requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } - ); - List items = new List(); - while (itemIterator.HasMoreResults) + foreach (bool enableODE in new bool[] { false, true }) { - items.AddRange(await itemIterator.ReadNextAsync()); - } - - Assert.AreEqual(2, toStreamCount); - Assert.AreEqual(1, fromStreamCount); - - toStreamCount = 0; - fromStreamCount = 0; + toStreamCount = 0; + fromStreamCount = 0; + + FeedIterator itemIterator = container.GetItemQueryIterator( + query, + requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = enableODE } + ); + List items = new List(); + while (itemIterator.HasMoreResults) + { + items.AddRange(await itemIterator.ReadNextAsync()); + } - // Verify that the custom serializer is actually being used via stream - FeedIterator itemStreamIterator = container.GetItemQueryStreamIterator( - query, - requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } - ); - while (itemStreamIterator.HasMoreResults) - { - ResponseMessage response = await itemStreamIterator.ReadNextAsync(); - using (StreamReader reader = new StreamReader(response.Content)) + // The toStreamCount variable will differ between ODE and non-ODE pipelines due to the non-ODE pipelines needing to get the query plan which makes an additional serialization call during its initialization. + if (enableODE) { - string content = await reader.ReadToEndAsync(); - Assert.IsTrue(content.Contains("9001.42")); - Assert.IsFalse(content.Contains("description"), "Description should be ignored and not in the JSON"); + Assert.AreEqual(1, toStreamCount); + } + else + { + Assert.AreEqual(2, toStreamCount); + } + + Assert.AreEqual(1, fromStreamCount); + + toStreamCount = 0; + fromStreamCount = 0; + + // Verify that the custom serializer is actually being used via stream + FeedIterator itemStreamIterator = container.GetItemQueryStreamIterator( + query, + requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = enableODE } + ); + while (itemStreamIterator.HasMoreResults) + { + ResponseMessage response = await itemStreamIterator.ReadNextAsync(); + using (StreamReader reader = new StreamReader(response.Content)) + { + string content = await reader.ReadToEndAsync(); + Assert.IsTrue(content.Contains("9001.42")); + Assert.IsFalse(content.Contains("description"), "Description should be ignored and not in the JSON"); + } } - } - Assert.AreEqual(2, toStreamCount); - Assert.AreEqual(0, fromStreamCount); + // The toStreamCount variable will differ between ODE and non-ODE pipelines due to the non-ODE pipelines needing to get the query plan which makes an additional serialization call during its initialization. + if (enableODE) + { + Assert.AreEqual(1, toStreamCount); + } + else + { + Assert.AreEqual(2, toStreamCount); + } + Assert.AreEqual(0, fromStreamCount); + } } finally { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs index e97d40bee9..053c07ecaa 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs @@ -102,7 +102,7 @@ public async Task InexistentPKRangeId() queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), feedRange: feedRange, continuationToken: null, - requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } + requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = true } ); CosmosException exception = await Assert.ThrowsExceptionAsync(() => feedIterator.ReadNextAsync()); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs index 91078a21c8..d16fa48090 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs @@ -538,7 +538,6 @@ static async Task ImplementationAsync(Container container, IReadOnlyList inputs = new List(); QueryRequestOptions requestOptions = new QueryRequestOptions() { - EnableOptimisticDirectExecution = false + EnableOptimisticDirectExecution = true }; int startLineNumber; From eb85e344204875d3d0d99921bbfa73090283e051 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Wed, 10 Jan 2024 12:11:32 -0800 Subject: [PATCH 12/25] Updated Feed token tests to test ODE and non ODE cases --- .../FeedToken/QueryFeedTokenTests.cs | 149 ++++++++++-------- 1 file changed, 79 insertions(+), 70 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs index 053c07ecaa..a5652e1010 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs @@ -98,16 +98,19 @@ public async Task InexistentPKRangeId() string feedRangeSerialization = JsonConvert.SerializeObject(new { PKRangeId = "10" }); FeedRange feedRange = FeedRange.FromJsonString(feedRangeSerialization); - FeedIterator feedIterator = container.GetItemQueryIterator( - queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), - feedRange: feedRange, - continuationToken: null, - requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = true } - ); - - CosmosException exception = await Assert.ThrowsExceptionAsync(() => feedIterator.ReadNextAsync()); - Assert.AreEqual(HttpStatusCode.Gone, exception.StatusCode); - Assert.AreEqual((int)Documents.SubStatusCodes.PartitionKeyRangeGone, exception.SubStatusCode); + foreach (bool enableODE in new bool[] { false, true }) + { + FeedIterator feedIterator = container.GetItemQueryIterator( + queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), + feedRange: feedRange, + continuationToken: null, + requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = enableODE } + ); + + CosmosException exception = await Assert.ThrowsExceptionAsync(() => feedIterator.ReadNextAsync()); + Assert.AreEqual(HttpStatusCode.Gone, exception.StatusCode); + Assert.AreEqual((int)Documents.SubStatusCodes.PartitionKeyRangeGone, exception.SubStatusCode); + } } finally { @@ -148,65 +151,68 @@ public async Task ParallelizeQueryThroughTokens() Assert.IsTrue(feedTokens.Count > 1, " RUs of the container needs to be increased to ensure at least 2 partitions."); - List>> tasks = feedTokens.Select(async feedToken => + foreach (bool enableODE in new bool[] { false, true }) { - List results = new List(); - FeedIteratorInternal feedIterator = container.GetItemQueryStreamIterator( - queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), - feedRange: feedToken, - continuationToken: null, - requestOptions: new QueryRequestOptions() { MaxItemCount = 10 }) as FeedIteratorInternal; - string continuation = null; - while (feedIterator.HasMoreResults) + List>> tasks = feedTokens.Select(async feedToken => { - using (ResponseMessage responseMessage = - await feedIterator.ReadNextAsync(this.cancellationToken)) + List results = new List(); + FeedIteratorInternal feedIterator = container.GetItemQueryStreamIterator( + queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), + feedRange: feedToken, + continuationToken: null, + requestOptions: new QueryRequestOptions() { MaxItemCount = 10, EnableOptimisticDirectExecution = enableODE }) as FeedIteratorInternal; + string continuation = null; + while (feedIterator.HasMoreResults) { - if (responseMessage.IsSuccessStatusCode) + using (ResponseMessage responseMessage = + await feedIterator.ReadNextAsync(this.cancellationToken)) { - using (StreamReader reader = new StreamReader(responseMessage.Content)) + if (responseMessage.IsSuccessStatusCode) { - string json = await reader.ReadToEndAsync(); - JArray documents = (JArray)JObject.Parse(json).SelectToken("Documents"); - foreach(JObject document in documents) + using (StreamReader reader = new StreamReader(responseMessage.Content)) { - results.Add(document.SelectToken("id").ToString()); + string json = await reader.ReadToEndAsync(); + JArray documents = (JArray)JObject.Parse(json).SelectToken("Documents"); + foreach (JObject document in documents) + { + results.Add(document.SelectToken("id").ToString()); + } } } - } - continuation = responseMessage.ContinuationToken; - break; + continuation = responseMessage.ContinuationToken; + break; + } } - } - feedIterator = container.GetItemQueryStreamIterator(queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), feedRange: feedToken, continuationToken: continuation, requestOptions: new QueryRequestOptions() { MaxItemCount = 10 }) as FeedIteratorInternal; - while (feedIterator.HasMoreResults) - { - using (ResponseMessage responseMessage = - await feedIterator.ReadNextAsync(this.cancellationToken)) + feedIterator = container.GetItemQueryStreamIterator(queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), feedRange: feedToken, continuationToken: continuation, requestOptions: new QueryRequestOptions() { MaxItemCount = 10, EnableOptimisticDirectExecution = enableODE }) as FeedIteratorInternal; + while (feedIterator.HasMoreResults) { - if (responseMessage.IsSuccessStatusCode) + using (ResponseMessage responseMessage = + await feedIterator.ReadNextAsync(this.cancellationToken)) { - using (StreamReader reader = new StreamReader(responseMessage.Content)) + if (responseMessage.IsSuccessStatusCode) { - string json = await reader.ReadToEndAsync(); - JArray documents = (JArray)JObject.Parse(json).SelectToken("Documents"); - foreach (JObject document in documents) + using (StreamReader reader = new StreamReader(responseMessage.Content)) { - results.Add(document.SelectToken("id").ToString()); + string json = await reader.ReadToEndAsync(); + JArray documents = (JArray)JObject.Parse(json).SelectToken("Documents"); + foreach (JObject document in documents) + { + results.Add(document.SelectToken("id").ToString()); + } } } } } - } - return results; - }).ToList(); + return results; + }).ToList(); - await Task.WhenAll(tasks); + await Task.WhenAll(tasks); - CollectionAssert.AreEquivalent(generatedIds, tasks.SelectMany(t => t.Result).ToList()); + CollectionAssert.AreEquivalent(generatedIds, tasks.SelectMany(t => t.Result).ToList()); + } } finally { @@ -247,39 +253,42 @@ public async Task ParallelizeQueryThroughTokens_OfT() Assert.IsTrue(feedTokens.Count > 1, " RUs of the container needs to be increased to ensure at least 2 partitions."); - List>> tasks = feedTokens.Select(async feedToken => + foreach (bool enableODE in new bool[] { false, true }) { - List results = new List(); - FeedIterator feedIterator = container.GetItemQueryIterator(queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), feedRange: feedToken, requestOptions: new QueryRequestOptions() { MaxItemCount = 10 }); - string continuation = null; - while (feedIterator.HasMoreResults) + List>> tasks = feedTokens.Select(async feedToken => { - FeedResponse response = await feedIterator.ReadNextAsync(); - foreach (ToDoActivity toDoActivity in response) + List results = new List(); + FeedIterator feedIterator = container.GetItemQueryIterator(queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), feedRange: feedToken, requestOptions: new QueryRequestOptions() { MaxItemCount = 10, EnableOptimisticDirectExecution = enableODE }); + string continuation = null; + while (feedIterator.HasMoreResults) { - results.Add(toDoActivity.id); - } + FeedResponse response = await feedIterator.ReadNextAsync(); + foreach (ToDoActivity toDoActivity in response) + { + results.Add(toDoActivity.id); + } - continuation = response.ContinuationToken; - break; - } + continuation = response.ContinuationToken; + break; + } - feedIterator = container.GetItemQueryIterator(queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), feedRange: feedToken, continuationToken: continuation, requestOptions: new QueryRequestOptions() { MaxItemCount = 10 }); - while (feedIterator.HasMoreResults) - { - FeedResponse response = await feedIterator.ReadNextAsync(); - foreach (ToDoActivity toDoActivity in response) + feedIterator = container.GetItemQueryIterator(queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), feedRange: feedToken, continuationToken: continuation, requestOptions: new QueryRequestOptions() { MaxItemCount = 10, EnableOptimisticDirectExecution = enableODE }); + while (feedIterator.HasMoreResults) { - results.Add(toDoActivity.id); + FeedResponse response = await feedIterator.ReadNextAsync(); + foreach (ToDoActivity toDoActivity in response) + { + results.Add(toDoActivity.id); + } } - } - return results; - }).ToList(); + return results; + }).ToList(); - await Task.WhenAll(tasks); + await Task.WhenAll(tasks); - CollectionAssert.AreEquivalent(generatedIds, tasks.SelectMany(t => t.Result).ToList()); + CollectionAssert.AreEquivalent(generatedIds, tasks.SelectMany(t => t.Result).ToList()); + } } finally { From 426f6b0c95fd7f347926ba6e802b536a70680997 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Thu, 11 Jan 2024 16:49:33 -0800 Subject: [PATCH 13/25] Added ODE testing for Session token regression test --- .../CosmosItemSessionTokenTests.cs | 310 +++++++++--------- 1 file changed, 158 insertions(+), 152 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs index 3467e8cf34..07dc15f65d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs @@ -302,179 +302,185 @@ public async Task NoSessionTokenCaptureForThrottledUpsertRequestsTest() [TestMethod] public async Task InvalidSessionTokenAfterContainerRecreationAndCollectionCacheRefreshReproTest() { - // ingestionClinet is dedicated client simulating the writes / container recreation in - // the separate process - like Spark job - using CosmosClient ingestionClient = TestCommon.CreateCosmosClient(); - Cosmos.Database ingestionDatabase = ingestionClient.GetDatabase(this.database.Id); - - ContainerProperties multiPartitionContainerSettings = - new ContainerProperties(id: Guid.NewGuid().ToString(), partitionKeyPath: "/pk"); - Container ingestionContainer = - await ingestionDatabase.CreateContainerAsync(multiPartitionContainerSettings); - - const int itemCountToBeIngested = 10; - string pk = Guid.NewGuid().ToString("N"); - long? latestLsn = null; - Console.WriteLine("INGEST DOCUMENTS"); - for (int i = 0; i < itemCountToBeIngested; i++) + foreach (bool enableODE in new bool[] { false, true }) { - ToDoActivity testItem = ToDoActivity.CreateRandomToDoActivity(); - testItem.pk = pk; - - ItemResponse response = - await ingestionContainer.CreateItemAsync(item: testItem); - Assert.IsNotNull(response); - Assert.IsNotNull(response.Resource); - Assert.IsNotNull(response.Diagnostics); - long? lsnAfterCreate = await GetLSNFromSessionContainer( - ingestionContainer, multiPartitionContainerSettings, new PartitionKey(pk)); - Assert.IsNotNull(lsnAfterCreate); - Assert.IsTrue(latestLsn == null || lsnAfterCreate.Value > latestLsn.Value); - latestLsn = lsnAfterCreate; - CosmosTraceDiagnostics diagnostics = (CosmosTraceDiagnostics)response.Diagnostics; - Assert.IsFalse(diagnostics.IsGoneExceptionHit()); - Assert.IsFalse(string.IsNullOrEmpty(diagnostics.ToString())); - Assert.IsTrue(diagnostics.GetClientElapsedTime() > TimeSpan.Zero); - } + // ingestionClinet is dedicated client simulating the writes / container recreation in + // the separate process - like Spark job + using CosmosClient ingestionClient = TestCommon.CreateCosmosClient(); + Cosmos.Database ingestionDatabase = ingestionClient.GetDatabase(this.database.Id); + + ContainerProperties multiPartitionContainerSettings = + new ContainerProperties(id: Guid.NewGuid().ToString(), partitionKeyPath: "/pk"); + Container ingestionContainer = + await ingestionDatabase.CreateContainerAsync(multiPartitionContainerSettings); + + const int itemCountToBeIngested = 10; + string pk = Guid.NewGuid().ToString("N"); + long? latestLsn = null; + Console.WriteLine("INGEST DOCUMENTS"); + for (int i = 0; i < itemCountToBeIngested; i++) + { + ToDoActivity testItem = ToDoActivity.CreateRandomToDoActivity(); + testItem.pk = pk; - // Dedciated query client used only for queries simulating the customer's app - string lastRequestedSessionToken = null; - Container queryContainer = TransportClientHelper.GetContainerWithIntercepter( - this.database.Id, - ingestionContainer.Id, - (uri, operation, request) => + ItemResponse response = + await ingestionContainer.CreateItemAsync(item: testItem); + Assert.IsNotNull(response); + Assert.IsNotNull(response.Resource); + Assert.IsNotNull(response.Diagnostics); + long? lsnAfterCreate = await GetLSNFromSessionContainer( + ingestionContainer, multiPartitionContainerSettings, new PartitionKey(pk)); + Assert.IsNotNull(lsnAfterCreate); + Assert.IsTrue(latestLsn == null || lsnAfterCreate.Value > latestLsn.Value); + latestLsn = lsnAfterCreate; + CosmosTraceDiagnostics diagnostics = (CosmosTraceDiagnostics)response.Diagnostics; + Assert.IsFalse(diagnostics.IsGoneExceptionHit()); + Assert.IsFalse(string.IsNullOrEmpty(diagnostics.ToString())); + Assert.IsTrue(diagnostics.GetClientElapsedTime() > TimeSpan.Zero); + } + + // Dedciated query client used only for queries simulating the customer's app + string lastRequestedSessionToken = null; + Container queryContainer = TransportClientHelper.GetContainerWithIntercepter( + this.database.Id, + ingestionContainer.Id, + (uri, operation, request) => + { + if (request.ResourceType == ResourceType.Document && + request.OperationType == OperationType.Query) + { + lastRequestedSessionToken = request.Headers[HttpConstants.HttpHeaders.SessionToken]; + } + }, + false, + null); + + long? lsnAfterQueryOnOldContainer = null; + + // Issueing two queries - first won't use session tokens yet + // second will provide session tokens captured from first request in the request to the backend + for (int i = 0; i < 2; i++) { - if (request.ResourceType == ResourceType.Document && - request.OperationType == OperationType.Query) + Console.WriteLine("RUN QUERY ON OLD CONTAINER ({0})", i); + using FeedIterator queryIteratorOldContainer = queryContainer.GetItemQueryIterator( + new QueryDefinition("Select c.id FROM c"), + continuationToken: null, + new QueryRequestOptions + { + ConsistencyLevel = Cosmos.ConsistencyLevel.Session, + PartitionKey = new Cosmos.PartitionKey(pk), + EnableOptimisticDirectExecution = enableODE + }); + int itemCountOldContainer = 0; + while (queryIteratorOldContainer.HasMoreResults) { - lastRequestedSessionToken = request.Headers[HttpConstants.HttpHeaders.SessionToken]; + FeedResponse response = await queryIteratorOldContainer.ReadNextAsync(); + if(i == 0) + { + string diagnosticString = response.Diagnostics.ToString(); + Assert.IsTrue(diagnosticString.Contains("PKRangeCache Info(")); + JObject diagnosticJobject = JObject.Parse(diagnosticString); + + JToken actualToken = diagnosticJobject.SelectToken(enableODE ? + "$.children[?(@.name=='Get Partition Key Ranges')].children[?(@.name=='Try Get Overlapping Ranges')].data" : + "$.children[0].children[?(@.name=='Get Partition Key Ranges')].children[?(@.name=='Try Get Overlapping Ranges')].data"); + JToken actualNode = actualToken.Children().First().First(); + + Assert.IsTrue(actualNode["Previous Continuation Token"].ToString().Length == 0); + Assert.IsTrue(actualNode["Continuation Token"].ToString().Length > 0); + } + + itemCountOldContainer += response.Count; } - }, - false, - null); - long? lsnAfterQueryOnOldContainer = null; + Assert.AreEqual(itemCountToBeIngested, itemCountOldContainer); + lsnAfterQueryOnOldContainer = await GetLSNFromSessionContainer( + queryContainer, multiPartitionContainerSettings, new PartitionKey(pk)); + Assert.IsNotNull(lsnAfterQueryOnOldContainer); + Assert.AreEqual(latestLsn.Value, lsnAfterQueryOnOldContainer.Value); + if (i == 0) + { + Assert.IsNull(lastRequestedSessionToken); + } + else + { + Assert.IsNotNull(lastRequestedSessionToken); + Assert.AreEqual(latestLsn.Value, SessionTokenHelper.Parse(lastRequestedSessionToken).LSN); + } + } - // Issueing two queries - first won't use session tokens yet - // second will provide session tokens captured from first request in the request to the backend - for (int i = 0; i < 2; i++) - { - Console.WriteLine("RUN QUERY ON OLD CONTAINER ({0})", i); - using FeedIterator queryIteratorOldContainer = queryContainer.GetItemQueryIterator( + Console.WriteLine( + "DELETE CONTAINER {0}", + (await queryContainer.ReadContainerAsync()).Resource.ResourceId); + await ingestionContainer.DeleteContainerAsync(); + + Console.WriteLine("RECREATING CONTAINER..."); + ContainerResponse ingestionContainerResponse = + await ingestionDatabase.CreateContainerAsync(multiPartitionContainerSettings); + ingestionContainer = ingestionContainerResponse.Container; + + string responseSessionTokenValue = + ingestionContainerResponse.Headers[HttpConstants.HttpHeaders.SessionToken]; + long? lsnAfterRecreatingContainerFromIngestionClient = responseSessionTokenValue != null ? + SessionTokenHelper.Parse(responseSessionTokenValue).LSN : null; + Console.WriteLine( + "RECREATED CONTAINER with new CollectionRid: {0} - LSN: {1}", + ingestionContainerResponse.Resource.ResourceId, + lsnAfterRecreatingContainerFromIngestionClient); + + // validates that the query container still uses the LSN captured from the old LSN + long? lsnAfterCreatingNewContainerFromQueryClient = await GetLSNFromSessionContainer( + queryContainer, multiPartitionContainerSettings, new PartitionKey(pk)); + Assert.IsNotNull(lsnAfterCreatingNewContainerFromQueryClient); + Assert.AreEqual(latestLsn.Value, lsnAfterCreatingNewContainerFromQueryClient.Value); + + Console.WriteLine("GET FEED RANGES"); + // this will force a CollectionCache refresh - because no pk ranegs can be identified + // for the old container anymore + _ = await queryContainer.GetFeedRangesAsync(); + + + Console.WriteLine("RUN QUERY ON NEW CONTAINER"); + int itemCountNewContainer = 0; + using FeedIterator queryIteratorNewContainer = queryContainer.GetItemQueryIterator( new QueryDefinition("Select c.id FROM c"), continuationToken: null, new QueryRequestOptions { ConsistencyLevel = Cosmos.ConsistencyLevel.Session, PartitionKey = new Cosmos.PartitionKey(pk), - EnableOptimisticDirectExecution = false }); - int itemCountOldContainer = 0; - while (queryIteratorOldContainer.HasMoreResults) + Console.WriteLine("Query iterator created"); + while (queryIteratorNewContainer.HasMoreResults) { - FeedResponse response = await queryIteratorOldContainer.ReadNextAsync(); - if(i == 0) + Console.WriteLine("Retrieving first page"); + try + { + FeedResponse response = await queryIteratorNewContainer.ReadNextAsync(); + Console.WriteLine("Request Diagnostics for query against new container: {0}", + response.Diagnostics.ToString()); + itemCountNewContainer += response.Count; + } + catch (CosmosException cosmosException) { - string diagnosticString = response.Diagnostics.ToString(); - Assert.IsTrue(diagnosticString.Contains("PKRangeCache Info(")); - JObject diagnosticJobject = JObject.Parse(diagnosticString); - JToken actualToken = diagnosticJobject.SelectToken("$.children[0].children[?(@.name=='Get Partition Key Ranges')].children[?(@.name=='Try Get Overlapping Ranges')].data"); - JToken actualNode = actualToken.Children().First().First(); - - Assert.IsTrue(actualNode["Previous Continuation Token"].ToString().Length == 0); - Assert.IsTrue(actualNode["Continuation Token"].ToString().Length > 0); + Console.WriteLine("COSMOS EXCEPTION: {0}", cosmosException); + throw; } - - itemCountOldContainer += response.Count; } - Assert.AreEqual(itemCountToBeIngested, itemCountOldContainer); - lsnAfterQueryOnOldContainer = await GetLSNFromSessionContainer( + Assert.AreEqual(0, itemCountNewContainer); + long? lsnAfterQueryOnNewContainer = await GetLSNFromSessionContainer( queryContainer, multiPartitionContainerSettings, new PartitionKey(pk)); - Assert.IsNotNull(lsnAfterQueryOnOldContainer); - Assert.AreEqual(latestLsn.Value, lsnAfterQueryOnOldContainer.Value); - if (i == 0) - { - Assert.IsNull(lastRequestedSessionToken); - } - else - { - Assert.IsNotNull(lastRequestedSessionToken); - Assert.AreEqual(latestLsn.Value, SessionTokenHelper.Parse(lastRequestedSessionToken).LSN); - } - } - - Console.WriteLine( - "DELETE CONTAINER {0}", - (await queryContainer.ReadContainerAsync()).Resource.ResourceId); - await ingestionContainer.DeleteContainerAsync(); - - Console.WriteLine("RECREATING CONTAINER..."); - ContainerResponse ingestionContainerResponse = - await ingestionDatabase.CreateContainerAsync(multiPartitionContainerSettings); - ingestionContainer = ingestionContainerResponse.Container; - - string responseSessionTokenValue = - ingestionContainerResponse.Headers[HttpConstants.HttpHeaders.SessionToken]; - long? lsnAfterRecreatingContainerFromIngestionClient = responseSessionTokenValue != null ? - SessionTokenHelper.Parse(responseSessionTokenValue).LSN : null; - Console.WriteLine( - "RECREATED CONTAINER with new CollectionRid: {0} - LSN: {1}", - ingestionContainerResponse.Resource.ResourceId, - lsnAfterRecreatingContainerFromIngestionClient); - - // validates that the query container still uses the LSN captured from the old LSN - long? lsnAfterCreatingNewContainerFromQueryClient = await GetLSNFromSessionContainer( - queryContainer, multiPartitionContainerSettings, new PartitionKey(pk)); - Assert.IsNotNull(lsnAfterCreatingNewContainerFromQueryClient); - Assert.AreEqual(latestLsn.Value, lsnAfterCreatingNewContainerFromQueryClient.Value); - - Console.WriteLine("GET FEED RANGES"); - // this will force a CollectionCache refresh - because no pk ranegs can be identified - // for the old container anymore - _ = await queryContainer.GetFeedRangesAsync(); - - - Console.WriteLine("RUN QUERY ON NEW CONTAINER"); - int itemCountNewContainer = 0; - using FeedIterator queryIteratorNewContainer = queryContainer.GetItemQueryIterator( - new QueryDefinition("Select c.id FROM c"), - continuationToken: null, - new QueryRequestOptions - { - ConsistencyLevel = Cosmos.ConsistencyLevel.Session, - PartitionKey = new Cosmos.PartitionKey(pk), - }); - Console.WriteLine("Query iterator created"); - while (queryIteratorNewContainer.HasMoreResults) - { - Console.WriteLine("Retrieving first page"); - try - { - FeedResponse response = await queryIteratorNewContainer.ReadNextAsync(); - Console.WriteLine("Request Diagnostics for query against new container: {0}", - response.Diagnostics.ToString()); - itemCountNewContainer += response.Count; - } - catch (CosmosException cosmosException) - { - Console.WriteLine("COSMOS EXCEPTION: {0}", cosmosException); - throw; - } + Assert.IsNotNull(lsnAfterQueryOnNewContainer); + Assert.IsTrue( + lastRequestedSessionToken == null || + SessionTokenHelper.Parse(lastRequestedSessionToken).LSN == + lsnAfterRecreatingContainerFromIngestionClient, + $"The requested session token {lastRequestedSessionToken} on the last query request should be null " + + $"or have LSN '{lsnAfterRecreatingContainerFromIngestionClient}' (which is the LSN after " + + "re-creating the container) if the session cache or the new CollectionName to Rid mapping was " + + "correctly populated in the SessionCache."); } - - Assert.AreEqual(0, itemCountNewContainer); - long? lsnAfterQueryOnNewContainer = await GetLSNFromSessionContainer( - queryContainer, multiPartitionContainerSettings, new PartitionKey(pk)); - Assert.IsNotNull(lsnAfterQueryOnNewContainer); - Assert.IsTrue( - lastRequestedSessionToken == null || - SessionTokenHelper.Parse(lastRequestedSessionToken).LSN == - lsnAfterRecreatingContainerFromIngestionClient, - $"The requested session token {lastRequestedSessionToken} on the last query request should be null " + - $"or have LSN '{lsnAfterRecreatingContainerFromIngestionClient}' (which is the LSN after " + - "re-creating the container) if the session cache or the new CollectionName to Rid mapping was " + - "correctly populated in the SessionCache."); } private static async Task GetPKRangeIdForPartitionKey( From 8f0ce417191f7d00aae419e0488de555e4edd610 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Fri, 12 Jan 2024 15:09:21 -0800 Subject: [PATCH 14/25] Updated AggregateQueryTests() and CosmosMultiHashTest() --- .../CosmosMultiHashTest.cs | 152 +++++++++--------- .../Query/AggregateQueryTests.cs | 52 +++--- 2 files changed, 107 insertions(+), 97 deletions(-) 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 c748fdad18..10b76f1a44 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -422,91 +422,91 @@ public async Task MultiHashReplaceItemTest() } [TestMethod] - [DataRow(true)] - [DataRow(false)] - public async Task MultiHashQueryItemTest(bool odeEnabled) + public async Task MultiHashQueryItemTest() { - Cosmos.PartitionKey pKey; - Cosmos.PartitionKey badPKey; - - //Create items for test - ItemResponse[] documents = new ItemResponse[3]; - Document doc = new Document { Id = "document1" }; - doc.SetValue("ZipCode", "500026"); - doc.SetValue("City", "Secunderabad"); - doc.SetValue("Type", "Residence"); - documents[0] = await this.container.CreateItemAsync(doc); - - doc = new Document { Id = "document2" }; - doc.SetValue("ZipCode", "15232"); - doc.SetValue("City", "Pittsburgh"); - doc.SetValue("Type", "Business"); - documents[1] = await this.container.CreateItemAsync(doc); - - doc = new Document { Id = "document3" }; - doc.SetValue("ZipCode", "11790"); - doc.SetValue("City", "Stonybrook"); - doc.SetValue("Type", "Goverment"); - documents[2] = await this.container.CreateItemAsync(doc); - - //Query - foreach (Document document in documents) + foreach (bool odeEnabled in new bool[] { false, true }) { - pKey = new PartitionKeyBuilder() - .Add(document.GetPropertyValue("ZipCode")) - .Add(document.GetPropertyValue("City")) - .Build(); - - badPKey = new PartitionKeyBuilder() - .Add(document.GetPropertyValue("City")) - .Build(); - - String query = $"SELECT * from c where c.id = \"{document.GetPropertyValue("id")}\""; - - using (FeedIterator feedIterator = this.container.GetItemQueryIterator( - query, - null, - new QueryRequestOptions() { EnableOptimisticDirectExecution = odeEnabled, PartitionKey = pKey })) + Cosmos.PartitionKey pKey; + Cosmos.PartitionKey badPKey; + + //Create items for test + ItemResponse[] documents = new ItemResponse[3]; + Document doc = new Document { Id = "document1" }; + doc.SetValue("ZipCode", "500026"); + doc.SetValue("City", "Secunderabad"); + doc.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document2" }; + doc.SetValue("ZipCode", "15232"); + doc.SetValue("City", "Pittsburgh"); + doc.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document3" }; + doc.SetValue("ZipCode", "11790"); + doc.SetValue("City", "Stonybrook"); + doc.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc); + + //Query + foreach (Document document in documents) { - Assert.IsTrue(feedIterator.HasMoreResults); + pKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("ZipCode")) + .Add(document.GetPropertyValue("City")) + .Build(); - FeedResponse queryDoc = await feedIterator.ReadNextAsync(); - queryDoc.First(); - Assert.IsTrue(queryDoc.Count == 1); - feedIterator.Dispose(); - } + badPKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("City")) + .Build(); - //Using an incomplete partition key with prefix of PK path definition - pKey = new PartitionKeyBuilder() - .Add(document.GetPropertyValue("ZipCode")) - .Build(); - using (FeedIterator feedIterator = this.container.GetItemQueryIterator( - query, - null, - new QueryRequestOptions() { EnableOptimisticDirectExecution = odeEnabled, PartitionKey = pKey })) - { - Assert.IsTrue(feedIterator.HasMoreResults); + String query = $"SELECT * from c where c.id = \"{document.GetPropertyValue("id")}\""; - FeedResponse queryDoc = await feedIterator.ReadNextAsync(); - queryDoc.First(); - Assert.IsTrue(queryDoc.Count == 1); - feedIterator.Dispose(); - } + using (FeedIterator feedIterator = this.container.GetItemQueryIterator( + query, + null, + new QueryRequestOptions() { EnableOptimisticDirectExecution = odeEnabled, PartitionKey = pKey })) + { + Assert.IsTrue(feedIterator.HasMoreResults); - //Negative test - using incomplete partition key - using (FeedIterator badFeedIterator = this.container.GetItemQueryIterator( - query, - null, - new QueryRequestOptions() { EnableOptimisticDirectExecution = odeEnabled, PartitionKey = badPKey})) - { - FeedResponse queryDocBad = await badFeedIterator.ReadNextAsync(); - Assert.ThrowsException(() => - queryDocBad.First() - ); - badFeedIterator.Dispose(); + FeedResponse queryDoc = await feedIterator.ReadNextAsync(); + queryDoc.First(); + Assert.IsTrue(queryDoc.Count == 1); + feedIterator.Dispose(); + } + + //Using an incomplete partition key with prefix of PK path definition + pKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("ZipCode")) + .Build(); + using (FeedIterator feedIterator = this.container.GetItemQueryIterator( + query, + null, + new QueryRequestOptions() { EnableOptimisticDirectExecution = odeEnabled, PartitionKey = pKey })) + { + Assert.IsTrue(feedIterator.HasMoreResults); + + FeedResponse queryDoc = await feedIterator.ReadNextAsync(); + queryDoc.First(); + Assert.IsTrue(queryDoc.Count == 1); + feedIterator.Dispose(); + } + + //Negative test - using incomplete partition key + using (FeedIterator badFeedIterator = this.container.GetItemQueryIterator( + query, + null, + new QueryRequestOptions() { EnableOptimisticDirectExecution = odeEnabled, PartitionKey = badPKey })) + { + FeedResponse queryDocBad = await badFeedIterator.ReadNextAsync(); + Assert.ThrowsException(() => + queryDocBad.First() + ); + badFeedIterator.Dispose(); + } } } } - } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs index 0cb380787d..62fe78133a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs @@ -60,7 +60,7 @@ public async Task TestAggregateFunctionsAsync() await this.CreateIngestQueryDeleteAsync( ConnectionModes.Direct | ConnectionModes.Gateway, - CollectionTypes.SinglePartition | CollectionTypes.MultiPartition, + CollectionTypes.SinglePartition, documents, ImplementationAsync, args, @@ -146,32 +146,42 @@ async Task ImplementationAsync( query, argument.ToString()); - List items = await QueryTestsBase.RunQueryAsync( - container, - query, - new QueryRequestOptions() - { - MaxConcurrency = maxDoP, - EnableOptimisticDirectExecution = false - }); - - if (argument.ExpectedValue == null) - { - Assert.AreEqual(0, items.Count, message); - } - else + foreach (bool enableODE in new bool[] { false, true }) { - Assert.AreEqual(1, items.Count, message); - CosmosElement expected = argument.ExpectedValue; - CosmosElement actual = items.Single(); + List items = await QueryTestsBase.RunQueryAsync( + container, + query, + new QueryRequestOptions() + { + MaxConcurrency = maxDoP, + EnableOptimisticDirectExecution = enableODE + }); - if ((expected is CosmosNumber expectedNumber) && (actual is CosmosNumber actualNumber)) + if (argument.ExpectedValue == null) { - Assert.AreEqual(Number64.ToDouble(expectedNumber.Value), Number64.ToDouble(actualNumber.Value), .01); + Assert.AreEqual(0, items.Count, message); } else { - Assert.AreEqual(expected, actual, message); + if (argument.ExpectedValue.Equals(CosmosUndefined.Create()) && enableODE == true) + { + Assert.AreEqual(0, items.Count, message); + } + else + { + Assert.AreEqual(1, items.Count, message); + CosmosElement expected = argument.ExpectedValue; + CosmosElement actual = items.Single(); + + if ((expected is CosmosNumber expectedNumber) && (actual is CosmosNumber actualNumber)) + { + Assert.AreEqual(Number64.ToDouble(expectedNumber.Value), Number64.ToDouble(actualNumber.Value), .01); + } + else + { + Assert.AreEqual(expected, actual, message); + } + } } } } From e30479f51a35a22f3c63e11b6c360c7d85336d28 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Fri, 12 Jan 2024 16:15:05 -0800 Subject: [PATCH 15/25] Reverted changes to OffsetLimitPageSize() --- .../Query/Pipeline/FullPipelineTests.cs | 70 ++++++++++++++----- 1 file changed, 51 insertions(+), 19 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs index c576f7a0f4..97598ea59f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs @@ -346,14 +346,60 @@ private async Task TestPageSizeAsync(string query, int expectedPageSize, int exp testInjections: queryRequestOptions.TestSettings); string databaseId = "db1234"; - (PartitionedQueryExecutionInfo partitionedQueryExecutionInfo, QueryPartitionProvider queryPartitionProvider) = GetPartitionedQueryExecutionInfoAndPartitionProvider(sqlQuerySpecJsonString, partitionKeyDefinition); + string resourceLink = $"dbs/{databaseId}/colls"; + const string suffix = "-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF"; + + List partitionKeyRanges = new List + { + new PartitionKeyRange() { MinInclusive = Documents.Routing.PartitionKeyInternal.MinimumInclusiveEffectivePartitionKey, MaxExclusive = "1F" + suffix }, + new PartitionKeyRange() { MinInclusive = "1F" + suffix, MaxExclusive = "3F" + suffix }, + new PartitionKeyRange() { MinInclusive = "3F" + suffix, MaxExclusive = "5F" + suffix }, + new PartitionKeyRange() { MinInclusive = "5F" + suffix, MaxExclusive = "7F" + suffix }, + new PartitionKeyRange() { MinInclusive = "7F" + suffix, MaxExclusive = "9F" + suffix }, + new PartitionKeyRange() { MinInclusive = "9F" + suffix, MaxExclusive = "BF" + suffix }, + new PartitionKeyRange() { MinInclusive = "BF" + suffix, MaxExclusive = "DF" + suffix }, + new PartitionKeyRange() { MinInclusive = "DF" + suffix, MaxExclusive = Documents.Routing.PartitionKeyInternal.MaximumExclusiveEffectivePartitionKey }, + }; + + Mock mockClient = new Mock(); + + mockClient.Setup(x => x.GetTargetPartitionKeyRangesAsync( + It.IsAny(), + "HelloWorld", + It.IsAny>>(), + It.IsAny(), + It.IsAny())) + .Returns((string resourceLink, string collectionResourceId, IReadOnlyList> providedRanges, bool forceRefresh, ITrace trace) => Task.FromResult(partitionKeyRanges)); + + mockClient.Setup(x => x.TryGetPartitionedQueryExecutionInfoAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Returns((SqlQuerySpec sqlQuerySpec, ResourceType resourceType, PartitionKeyDefinition partitionKeyDefinition, bool requireFormattableOrderByQuery, bool isContinuationExpected, bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, bool useSystemPrefix, Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken) => + { + CosmosSerializerCore serializerCore = new(); + using StreamReader streamReader = new(serializerCore.ToStreamSqlQuerySpec(sqlQuerySpec, Documents.ResourceType.Document)); + string sqlQuerySpecJsonString = streamReader.ReadToEnd(); + + (PartitionedQueryExecutionInfo partitionedQueryExecutionInfo, QueryPartitionProvider queryPartitionProvider) = OptimisticDirectExecutionQueryBaselineTests.GetPartitionedQueryExecutionInfoAndPartitionProvider(sqlQuerySpecJsonString, partitionKeyDefinition); + return Task.FromResult(TryCatch.FromResult(partitionedQueryExecutionInfo)); + } + ); CosmosQueryContextCore cosmosQueryContextCore = new CosmosQueryContextCore( - client: new TestCosmosQueryClient(queryPartitionProvider), + client: new TestCosmosQueryClient(GetQueryPartitionProvider()), resourceTypeEnum: Documents.ResourceType.Document, operationType: Documents.OperationType.Query, resourceType: typeof(QueryResponseCore), - resourceLink: $"dbs/{databaseId}/colls", + resourceLink: resourceLink, isContinuationExpected: true, allowNonValueAggregateQuery: true, useSystemPrefix: false, @@ -362,7 +408,7 @@ private async Task TestPageSizeAsync(string query, int expectedPageSize, int exp return Tuple.Create(inputParameters, cosmosQueryContextCore); } - internal static Tuple GetPartitionedQueryExecutionInfoAndPartitionProvider(string querySpecJsonString, PartitionKeyDefinition pkDefinition) + internal static QueryPartitionProvider GetQueryPartitionProvider() { IDictionary DefaultQueryengineConfiguration = new Dictionary() { @@ -388,21 +434,7 @@ internal static Tuple Get {"sqlEnableParameterExpansionCheck", true} }; - QueryPartitionProvider queryPartitionProvider = new QueryPartitionProvider(DefaultQueryengineConfiguration); - - TryCatch tryGetQueryPlan = queryPartitionProvider.TryGetPartitionedQueryExecutionInfo( - querySpecJsonString: querySpecJsonString, - partitionKeyDefinition: pkDefinition, - requireFormattableOrderByQuery: true, - isContinuationExpected: true, - allowNonValueAggregateQuery: true, - hasLogicalPartitionKey: false, - allowDCount: true, - useSystemPrefix: false, - geospatialType: Cosmos.GeospatialType.Geography); - - PartitionedQueryExecutionInfo partitionedQueryExecutionInfo = tryGetQueryPlan.Succeeded ? tryGetQueryPlan.Result : throw tryGetQueryPlan.Exception; - return Tuple.Create(partitionedQueryExecutionInfo, queryPartitionProvider); + return new QueryPartitionProvider(DefaultQueryengineConfiguration); } internal static async Task> ExecuteQueryAsync( From a8e01e81972e601b2386a99186b9e5ce4ceb0a82 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Mon, 15 Jan 2024 15:26:19 -0800 Subject: [PATCH 16/25] Added ODE testing to AggregateFunctionAsync() --- .../Query/AggregateQueryTests.cs | 228 ++++++++++++------ 1 file changed, 148 insertions(+), 80 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs index 62fe78133a..d06fdc84d7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs @@ -14,7 +14,6 @@ using Microsoft.Azure.Cosmos.Json; using Microsoft.Azure.Documents; using Microsoft.VisualStudio.TestTools.UnitTesting; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; [TestClass] @@ -58,70 +57,91 @@ public async Task TestAggregateFunctionsAsync() documents.Add(doc.ToString()); } + await this.CreateIngestQueryDeleteAsync( + ConnectionModes.Direct | ConnectionModes.Gateway, + CollectionTypes.SinglePartition | CollectionTypes.MultiPartition, + documents, + NonOdeImplementationAsync, + args, + "/" + args.PartitionKey); + await this.CreateIngestQueryDeleteAsync( ConnectionModes.Direct | ConnectionModes.Gateway, CollectionTypes.SinglePartition, documents, - ImplementationAsync, + OdeImplementationAsync, args, "/" + args.PartitionKey); - async Task ImplementationAsync( + async Task NonOdeImplementationAsync( Container container, IReadOnlyList inputDocuments, AggregateTestArgs aggregateTestArgs) { - IReadOnlyList documentsWherePkIsANumber = inputDocuments - .Where(doc => - { - return double.TryParse( - doc[aggregateTestArgs.PartitionKey].ToString(), - out double result); - }) - .ToList(); - double numberSum = documentsWherePkIsANumber - .Sum(doc => + AggregateQueryArguments[] aggregateQueryArgumentsList = CreateAggregateQueryArguments(inputDocuments, aggregateTestArgs); + foreach (int maxDoP in new[] { 0, 10 }) + { + foreach (AggregateQueryArguments argument in aggregateQueryArgumentsList) { - if (!doc.TryGetValue(aggregateTestArgs.PartitionKey, out CosmosNumber number)) + string[] queryFormats = new[] { - Assert.Fail("Failed to get partition key from document"); - } + "SELECT VALUE {0}(r.{1}) FROM r WHERE {2}", + "SELECT VALUE {0}(r.{1}) FROM r WHERE {2} ORDER BY r.{1}" + }; - return Number64.ToDouble(number.Value); - }); - double count = documentsWherePkIsANumber.Count(); - AggregateQueryArguments[] aggregateQueryArgumentsList = new AggregateQueryArguments[] - { - new AggregateQueryArguments( - aggregateOperator: "AVG", - expectedValue: CosmosNumber64.Create(numberSum / count), - predicate: $"IS_NUMBER(r.{aggregateTestArgs.PartitionKey})"), - new AggregateQueryArguments( - aggregateOperator: "AVG", - expectedValue: CosmosUndefined.Create(), - predicate: "true"), - new AggregateQueryArguments( - aggregateOperator: "COUNT", - expectedValue: CosmosNumber64.Create(documents.Count()), - predicate: "true"), - new AggregateQueryArguments( - aggregateOperator: "MAX", - expectedValue: CosmosString.Create("xyz"), - predicate: "true"), - new AggregateQueryArguments( - aggregateOperator: "MIN", - expectedValue: CosmosBoolean.Create(false), - predicate: "true"), - new AggregateQueryArguments( - aggregateOperator: "SUM", - expectedValue: CosmosNumber64.Create(numberSum), - predicate: $"IS_NUMBER(r.{aggregateTestArgs.PartitionKey})"), - new AggregateQueryArguments( - aggregateOperator: "SUM", - expectedValue: CosmosUndefined.Create(), - predicate: $"true"), - }; + foreach (string queryFormat in queryFormats) + { + string query = string.Format( + CultureInfo.InvariantCulture, + queryFormat, + argument.AggregateOperator, + aggregateTestArgs.PartitionKey, + argument.Predicate); + string message = string.Format( + CultureInfo.InvariantCulture, + "query: {0}, data: {1}", + query, + argument.ToString()); + + List items = await QueryTestsBase.RunQueryAsync( + container, + query, + new QueryRequestOptions() + { + MaxConcurrency = maxDoP, + EnableOptimisticDirectExecution = false + }); + if (argument.ExpectedValue == null) + { + Assert.AreEqual(0, items.Count, message); + } + else + { + Assert.AreEqual(1, items.Count, message); + CosmosElement expected = argument.ExpectedValue; + CosmosElement actual = items.Single(); + + if ((expected is CosmosNumber expectedNumber) && (actual is CosmosNumber actualNumber)) + { + Assert.AreEqual(Number64.ToDouble(expectedNumber.Value), Number64.ToDouble(actualNumber.Value), .01); + } + else + { + Assert.AreEqual(expected, actual, message); + } + } + } + } + } + } + + async Task OdeImplementationAsync( + Container container, + IReadOnlyList inputDocuments, + AggregateTestArgs aggregateTestArgs) + { + AggregateQueryArguments[] aggregateQueryArgumentsList = CreateAggregateQueryArguments(inputDocuments, aggregateTestArgs); foreach (int maxDoP in new[] { 0, 10 }) { foreach (AggregateQueryArguments argument in aggregateQueryArgumentsList) @@ -146,42 +166,32 @@ async Task ImplementationAsync( query, argument.ToString()); - foreach (bool enableODE in new bool[] { false, true }) - { - List items = await QueryTestsBase.RunQueryAsync( - container, - query, - new QueryRequestOptions() - { + List items = await QueryTestsBase.RunQueryAsync( + container, + query, + new QueryRequestOptions() + { MaxConcurrency = maxDoP, - EnableOptimisticDirectExecution = enableODE - }); + EnableOptimisticDirectExecution = true + }); - if (argument.ExpectedValue == null) + if (argument.ExpectedValue == CosmosUndefined.Create()) + { + Assert.AreEqual(0, items.Count, message); + } + else + { + Assert.AreEqual(1, items.Count, message); + CosmosElement expected = argument.ExpectedValue; + CosmosElement actual = items.Single(); + + if ((expected is CosmosNumber expectedNumber) && (actual is CosmosNumber actualNumber)) { - Assert.AreEqual(0, items.Count, message); + Assert.AreEqual(Number64.ToDouble(expectedNumber.Value), Number64.ToDouble(actualNumber.Value), .01); } else { - if (argument.ExpectedValue.Equals(CosmosUndefined.Create()) && enableODE == true) - { - Assert.AreEqual(0, items.Count, message); - } - else - { - Assert.AreEqual(1, items.Count, message); - CosmosElement expected = argument.ExpectedValue; - CosmosElement actual = items.Single(); - - if ((expected is CosmosNumber expectedNumber) && (actual is CosmosNumber actualNumber)) - { - Assert.AreEqual(Number64.ToDouble(expectedNumber.Value), Number64.ToDouble(actualNumber.Value), .01); - } - else - { - Assert.AreEqual(expected, actual, message); - } - } + Assert.AreEqual(expected, actual, message); } } } @@ -190,6 +200,64 @@ async Task ImplementationAsync( } } + private static AggregateQueryArguments[] CreateAggregateQueryArguments( + IReadOnlyList inputDocuments, + AggregateTestArgs aggregateTestArgs) + { + IReadOnlyList documentsWherePkIsANumber = inputDocuments + .Where(doc => + { + return double.TryParse( + doc[aggregateTestArgs.PartitionKey].ToString(), + out double result); + }) + .ToList(); + double numberSum = documentsWherePkIsANumber + .Sum(doc => + { + if (!doc.TryGetValue(aggregateTestArgs.PartitionKey, out CosmosNumber number)) + { + Assert.Fail("Failed to get partition key from document"); + } + + return Number64.ToDouble(number.Value); + }); + double count = documentsWherePkIsANumber.Count(); + AggregateQueryArguments[] aggregateQueryArgumentsList = new AggregateQueryArguments[] + { + new AggregateQueryArguments( + aggregateOperator: "AVG", + expectedValue: CosmosNumber64.Create(numberSum / count), + predicate: $"IS_NUMBER(r.{aggregateTestArgs.PartitionKey})"), + new AggregateQueryArguments( + aggregateOperator: "AVG", + expectedValue: CosmosUndefined.Create(), + predicate: "true"), + new AggregateQueryArguments( + aggregateOperator: "COUNT", + expectedValue: CosmosNumber64.Create(inputDocuments.Count()), + predicate: "true"), + new AggregateQueryArguments( + aggregateOperator: "MAX", + expectedValue: CosmosString.Create("xyz"), + predicate: "true"), + new AggregateQueryArguments( + aggregateOperator: "MIN", + expectedValue: CosmosBoolean.Create(false), + predicate: "true"), + new AggregateQueryArguments( + aggregateOperator: "SUM", + expectedValue: CosmosNumber64.Create(numberSum), + predicate: $"IS_NUMBER(r.{aggregateTestArgs.PartitionKey})"), + new AggregateQueryArguments( + aggregateOperator: "SUM", + expectedValue: CosmosUndefined.Create(), + predicate: $"true"), + }; + + return aggregateQueryArgumentsList; + } + private readonly struct AggregateTestArgs { public AggregateTestArgs( From 53ed6dcc56555b74e5d2723f544e3ab6cd5535c2 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Mon, 15 Jan 2024 15:41:50 -0800 Subject: [PATCH 17/25] Removed account details from baseline tests --- ...EndTraceWriterBaselineTests.QueryAsync.xml | 112 +++++++++--------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 8eb22d4334..fadc76f1fa 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -667,7 +667,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -680,7 +680,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -690,7 +690,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -703,7 +703,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -713,7 +713,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -726,7 +726,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -736,7 +736,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -749,7 +749,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -1452,7 +1452,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -1465,7 +1465,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -1475,7 +1475,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -1488,7 +1488,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -1498,7 +1498,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -1511,7 +1511,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -1521,7 +1521,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -1534,7 +1534,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -2218,7 +2218,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -2231,7 +2231,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -2241,7 +2241,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -2254,7 +2254,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -2264,7 +2264,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -2277,7 +2277,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -2287,7 +2287,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -2300,7 +2300,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -3004,7 +3004,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -3017,7 +3017,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -3027,7 +3027,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -3040,7 +3040,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -3050,7 +3050,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -3063,7 +3063,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -3073,7 +3073,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -3086,7 +3086,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -3869,7 +3869,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -3882,7 +3882,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -3892,7 +3892,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -3905,7 +3905,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -3915,7 +3915,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -3928,7 +3928,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -3938,7 +3938,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -3951,7 +3951,7 @@ Some Value Some Value Some Value - East US 2,East US 2 + South Central US Microsoft.DocumentDB @@ -4651,7 +4651,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -4664,7 +4664,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -4674,7 +4674,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -4687,7 +4687,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -4697,7 +4697,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -4710,7 +4710,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -4720,7 +4720,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -4733,7 +4733,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -5453,7 +5453,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -5466,7 +5466,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -5476,7 +5476,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -5489,7 +5489,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -5499,7 +5499,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -5512,7 +5512,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB @@ -5522,7 +5522,7 @@ containerName cosmosdb Some Value - akotalwar-test2.documents-staging.windows-ppe.net + 127.0.0.1 Some Value Some Value Direct @@ -5535,7 +5535,7 @@ Some Value Some Value Some Value - East US 2 + South Central US Microsoft.DocumentDB From 0110e904acb669dc8fdd3f939b914ee06af12be8 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Mon, 15 Jan 2024 16:34:10 -0800 Subject: [PATCH 18/25] Added assert to confirm that the right document is being returned every time --- .../CosmosMultiHashTest.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 10b76f1a44..06cdeb01c8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -471,8 +471,9 @@ public async Task MultiHashQueryItemTest() Assert.IsTrue(feedIterator.HasMoreResults); FeedResponse queryDoc = await feedIterator.ReadNextAsync(); - queryDoc.First(); + Document retrievedDocument = queryDoc.First(); Assert.IsTrue(queryDoc.Count == 1); + Assert.AreEqual(document.Id, retrievedDocument.Id); feedIterator.Dispose(); } @@ -488,8 +489,9 @@ public async Task MultiHashQueryItemTest() Assert.IsTrue(feedIterator.HasMoreResults); FeedResponse queryDoc = await feedIterator.ReadNextAsync(); - queryDoc.First(); + Document retrievedDocument = queryDoc.First(); Assert.IsTrue(queryDoc.Count == 1); + Assert.AreEqual(document.Id, retrievedDocument.Id); feedIterator.Dispose(); } From ac552082eb2578c542ede4abe8c30cf9626c07e3 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Tue, 16 Jan 2024 10:12:50 -0800 Subject: [PATCH 19/25] Updated location of foreach loop for ODE --- .../CosmosMultiHashTest.cs | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) 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 06cdeb01c8..01e1fc5c66 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -424,31 +424,31 @@ public async Task MultiHashReplaceItemTest() [TestMethod] public async Task MultiHashQueryItemTest() { + Cosmos.PartitionKey pKey; + Cosmos.PartitionKey badPKey; + + //Create items for test + ItemResponse[] documents = new ItemResponse[3]; + Document doc = new Document { Id = "document1" }; + doc.SetValue("ZipCode", "500026"); + doc.SetValue("City", "Secunderabad"); + doc.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document2" }; + doc.SetValue("ZipCode", "15232"); + doc.SetValue("City", "Pittsburgh"); + doc.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document3" }; + doc.SetValue("ZipCode", "11790"); + doc.SetValue("City", "Stonybrook"); + doc.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc); + foreach (bool odeEnabled in new bool[] { false, true }) { - Cosmos.PartitionKey pKey; - Cosmos.PartitionKey badPKey; - - //Create items for test - ItemResponse[] documents = new ItemResponse[3]; - Document doc = new Document { Id = "document1" }; - doc.SetValue("ZipCode", "500026"); - doc.SetValue("City", "Secunderabad"); - doc.SetValue("Type", "Residence"); - documents[0] = await this.container.CreateItemAsync(doc); - - doc = new Document { Id = "document2" }; - doc.SetValue("ZipCode", "15232"); - doc.SetValue("City", "Pittsburgh"); - doc.SetValue("Type", "Business"); - documents[1] = await this.container.CreateItemAsync(doc); - - doc = new Document { Id = "document3" }; - doc.SetValue("ZipCode", "11790"); - doc.SetValue("City", "Stonybrook"); - doc.SetValue("Type", "Goverment"); - documents[2] = await this.container.CreateItemAsync(doc); - //Query foreach (Document document in documents) { From ddea7d094a2b5e3ab3c1ee15b8652de26a45d488 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Wed, 17 Jan 2024 10:34:19 -0800 Subject: [PATCH 20/25] Updated baselines --- ...EndTraceWriterBaselineTests.QueryAsync.xml | 181 ++------- ...TraceWriterBaselineTests.ReadManyAsync.xml | 384 ++++-------------- 2 files changed, 109 insertions(+), 456 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index fadc76f1fa..552286f4ba 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -53,7 +53,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -90,7 +89,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -127,7 +125,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -164,7 +161,6 @@ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [System Info] @@ -285,10 +281,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -389,10 +381,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -493,10 +481,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -597,10 +581,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -818,7 +798,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -856,7 +835,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -894,7 +872,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -932,7 +909,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -1054,10 +1030,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1162,10 +1134,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1270,10 +1238,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1378,10 +1342,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1604,7 +1564,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -1641,7 +1600,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -1678,7 +1636,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -1715,7 +1672,6 @@ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [System Info] @@ -1836,10 +1792,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -1940,10 +1892,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2044,10 +1992,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2148,10 +2092,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2370,7 +2310,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -2408,7 +2347,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -2446,7 +2384,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -2484,7 +2421,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -2606,10 +2542,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2714,10 +2646,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2822,10 +2750,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -2930,10 +2854,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3145,7 +3065,6 @@ │ │ │ Redacted To Not Change The Baselines From Run To Run │ │ │ ) │ │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -3181,7 +3100,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -3219,7 +3137,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -3257,7 +3174,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -3295,7 +3211,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -3353,10 +3268,6 @@ "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler", "duration in milliseconds": 0, "children": [ - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3471,10 +3382,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3579,10 +3486,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3687,10 +3590,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3795,10 +3694,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -3951,7 +3846,7 @@ Some Value Some Value Some Value - South Central US + South Central US,South Central US Microsoft.DocumentDB @@ -4010,8 +3905,9 @@ │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -4025,7 +3921,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -4062,7 +3957,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -4099,7 +3993,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -4136,7 +4029,6 @@ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [System Info] @@ -4221,12 +4113,18 @@ ] }, { - "name": "Get Partition Key Ranges", + "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] } ] }, @@ -4269,10 +4167,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4373,10 +4267,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4477,10 +4367,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4581,10 +4467,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -4792,8 +4674,9 @@ │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ├── Prefetching(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -4807,7 +4690,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -4845,7 +4727,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -4883,7 +4764,6 @@ │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ │ ( │ │ │ │ [System Info] @@ -4921,7 +4801,6 @@ │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Get Partition Key Range Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ ├── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ │ │ ( │ │ │ [System Info] @@ -5007,12 +4886,18 @@ ] }, { - "name": "Get Partition Key Ranges", + "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] } ] }, @@ -5055,10 +4940,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -5163,10 +5044,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -5271,10 +5148,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, @@ -5379,10 +5252,6 @@ "name": "Try Get Overlapping Ranges", "duration in milliseconds": 0 }, - { - "name": "Get Collection Cache", - "duration in milliseconds": 0 - }, { "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler", "duration in milliseconds": 0, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 227dff19bc..55033eeb40 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -25,17 +25,11 @@ │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── Create Query Pipeline(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── [05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [Query Metrics] @@ -66,17 +60,11 @@ │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── Create Query Pipeline(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [Query Metrics] @@ -107,17 +95,11 @@ │ Redacted To Not Change The Baselines From Run To Run │ ) ├── Create Query Pipeline(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds └── [05C1E7FFFFFFFA,FF) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ ( │ [Query Metrics] @@ -173,52 +155,22 @@ "duration in milliseconds": 0 } ] - }, - { - "name": "Service Interop Query Plan", - "duration in milliseconds": 0 - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] } ] }, { - "name": "Get Partition Key Ranges", + "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] } ] }, @@ -315,52 +267,22 @@ "duration in milliseconds": 0 } ] - }, - { - "name": "Service Interop Query Plan", - "duration in milliseconds": 0 - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] } ] }, { - "name": "Get Partition Key Ranges", + "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] } ] }, @@ -457,52 +379,22 @@ "duration in milliseconds": 0 } ] - }, - { - "name": "Service Interop Query Plan", - "duration in milliseconds": 0 - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] } ] }, { - "name": "Get Partition Key Ranges", + "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] } ] }, @@ -637,17 +529,11 @@ │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── Create Query Pipeline(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── [05C1CFFFFFFFF8,05C1DFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [Query Metrics] @@ -678,17 +564,11 @@ │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── Create Query Pipeline(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── [,05C1CFFFFFFFF8) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [Query Metrics] @@ -719,17 +599,11 @@ │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── Create Query Pipeline(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Service Interop Query Plan(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds - │ │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ ├── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds - │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Container Properties(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ ├── Get Overlapping Feed Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Get Partition Key Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ │ └── Try Get Overlapping Ranges(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds │ └── [05C1E7FFFFFFFA,FF) move next(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds │ │ ( │ │ [Query Metrics] @@ -788,52 +662,22 @@ "duration in milliseconds": 0 } ] - }, - { - "name": "Service Interop Query Plan", - "duration in milliseconds": 0 - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] } ] }, { - "name": "Get Partition Key Ranges", + "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] } ] }, @@ -930,52 +774,22 @@ "duration in milliseconds": 0 } ] - }, - { - "name": "Service Interop Query Plan", - "duration in milliseconds": 0 - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] } ] }, { - "name": "Get Partition Key Ranges", + "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] } ] }, @@ -1072,52 +886,22 @@ "duration in milliseconds": 0 } ] - }, - { - "name": "Service Interop Query Plan", - "duration in milliseconds": 0 - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] - }, - { - "name": "Get Overlapping Feed Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Get Partition Key Ranges", - "duration in milliseconds": 0, - "children": [ - { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 - } - ] - } - ] } ] }, { - "name": "Get Partition Key Ranges", + "name": "Get Overlapping Feed Ranges", "duration in milliseconds": 0, "children": [ { - "name": "Try Get Overlapping Ranges", - "duration in milliseconds": 0 + "name": "Get Partition Key Ranges", + "duration in milliseconds": 0, + "children": [ + { + "name": "Try Get Overlapping Ranges", + "duration in milliseconds": 0 + } + ] } ] }, From 09183782216588e42ab44e8847e0064a99686dee Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Thu, 18 Jan 2024 18:44:33 -0800 Subject: [PATCH 21/25] Fixed comments --- .../CosmosQueryExecutionContextFactory.cs | 2 +- .../CosmosBasicQueryTests.cs | 5 +- .../CosmosGatewayTimeoutTests.cs | 1 + .../CosmosItemSessionTokenTests.cs | 2 +- .../Linq/LinqTestsCommon.cs | 54 +++++++++++-------- .../Linq/LinqTranslationBaselineTests.cs | 5 +- .../Query/SanityQueryTests.cs | 1 + .../EndToEndTraceWriterBaselineTests.cs | 5 +- 8 files changed, 39 insertions(+), 36 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index 3fcdfc45da..e7a65b7457 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -34,7 +34,7 @@ internal static class CosmosQueryExecutionContextFactory { internal const string ClientDisableOptimisticDirectExecution = "clientDisableOptimisticDirectExecution"; private const string InternalPartitionKeyDefinitionProperty = "x-ms-query-partitionkey-definition"; - private const string QueryInspectionPattern = @"\s+(GROUP\s+BY\s+|COUNT\s*\(|MIN\s*\(|MAX\s*\(|AVG\s*\(|SUM\s*\(|DISTINCT\s+)"; + private const string QueryInspectionPattern = @"\s*(GROUP\s+BY\s+|COUNT\s*\(|MIN\s*\(|MAX\s*\(|AVG\s*\(|SUM\s*\(|DISTINCT\s+)"; private const string OptimisticDirectExecution = "OptimisticDirectExecution"; private const string Passthrough = "Passthrough"; private const string Specialized = "Specialized"; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs index 4583028fa9..4fbfe8fbfb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs @@ -240,7 +240,6 @@ public async Task QueryRequestRateTest(bool directMode) { MaxItemCount = 1, MaxConcurrency = 1, - EnableOptimisticDirectExecution = true })) { while (feedIterator.HasMoreResults) @@ -269,7 +268,6 @@ public async Task QueryRequestRateTest(bool directMode) { MaxItemCount = 1, MaxConcurrency = 1, - EnableOptimisticDirectExecution = true }); // First request should be a success @@ -799,7 +797,7 @@ public async Task TesOdeTokenCompatibilityWithNonOdePipeline() QueryRequestOptions queryRequestOptions = new QueryRequestOptions { MaxItemCount = 50, - EnableOptimisticDirectExecution = true + EnableOptimisticDirectExecution = false }; FeedIteratorInternal feedIterator = @@ -814,7 +812,6 @@ public async Task TesOdeTokenCompatibilityWithNonOdePipeline() QueryRequestOptions newQueryRequestOptions = new QueryRequestOptions { MaxItemCount = 50, - EnableOptimisticDirectExecution = true }; // use Continuation Token to create new iterator and use same trace diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs index ddf953258a..7931bc607a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs @@ -83,6 +83,7 @@ public async Task QueryPlanRetryTimeoutTestAsync() QueryRequestOptions requestOptions = new QueryRequestOptions() { + // ODE set to false in this scenario as using ODE could cause the query plan to not get invoked. EnableOptimisticDirectExecution = false }; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs index 07dc15f65d..e967f495a6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs @@ -304,7 +304,7 @@ public async Task InvalidSessionTokenAfterContainerRecreationAndCollectionCacheR { foreach (bool enableODE in new bool[] { false, true }) { - // ingestionClinet is dedicated client simulating the writes / container recreation in + // ingestionClient is dedicated client simulating the writes / container recreation in // the separate process - like Spark job using CosmosClient ingestionClient = TestCommon.CreateCosmosClient(); Cosmos.Database ingestionDatabase = ingestionClient.GetDatabase(this.database.Id); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs index 744d3acafa..74d8cbdf61 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs @@ -311,10 +311,7 @@ public static Func> GenerateTestCosmosData(Func query = container.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions); @@ -351,10 +348,7 @@ public static Func> GenerateSerializationTestCosmosData(F } FeedOptions feedOptions = new FeedOptions() { EnableScanInQuery = true, EnableCrossPartitionQuery = true }; - QueryRequestOptions requestOptions = new QueryRequestOptions() - { - EnableOptimisticDirectExecution = false - }; + QueryRequestOptions requestOptions = new QueryRequestOptions(); IOrderedQueryable query = container.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions, linqSerializerOptions: linqSerializerOptions); @@ -536,10 +530,7 @@ public static Func> GenerateSimpleCosmosData(Cosmos.Datab } FeedOptions feedOptions = new FeedOptions() { EnableScanInQuery = true, EnableCrossPartitionQuery = true }; - QueryRequestOptions requestOptions = new QueryRequestOptions() - { - EnableOptimisticDirectExecution = false - }; + QueryRequestOptions requestOptions = new QueryRequestOptions(); IOrderedQueryable query = container.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions); @@ -585,32 +576,51 @@ public static LinqTestOutput ExecuteTest(LinqTestInput input, bool serializeResu } public static string BuildExceptionMessageForTest(Exception ex) - { - StringBuilder message = new StringBuilder(); + { + StringBuilder message = new StringBuilder(); do { if (ex is CosmosException cosmosException) - { - message.Append($"Status Code: {cosmosException.StatusCode}"); + { + Match match = Regex.Match(ex.Message, @"Reason:(.*?}]})", RegexOptions.IgnoreCase); + if (match.Success) + { + // ODE scenario: The backend generates an error response message with significant variations when compared to the Service Interop. + // The objective is to standardize and normalize the backend response for consistency. + string reason = match.Groups[1].Value; + reason = reason.Replace("\\", ""); + + string transformedString = "Status Code: " + reason; + transformedString = transformedString.Replace(" (", ""); + transformedString = transformedString.Replace("{\"code\":\"", ""); + transformedString = transformedString.Replace("\",\"message\":\"Message: {\"errors\":[", ",{\"errors\":["); + transformedString = transformedString.Replace("}]}", "}]},0x800A0B00"); + + return transformedString; + } + else + { + message.Append($"Status Code: {cosmosException.StatusCode}"); + } } else if (ex is DocumentClientException documentClientException) { message.Append(documentClientException.RawErrorMessage); } else - { - message.Append(ex.Message); + { + message.Append(ex.Message); } - + ex = ex.InnerException; if (ex != null) { message.Append(","); } } - while (ex != null); - - return message.ToString(); + while (ex != null); + + return message.ToString(); } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs index 2fd8a399f0..58aef32721 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs @@ -1219,10 +1219,7 @@ public void TestSelectTop() Tuple> generatedData = this.CreateDataTestSelectTop(); int seed = generatedData.Item1; List data = generatedData.Item2; - QueryRequestOptions requestOptions = new QueryRequestOptions() - { - EnableOptimisticDirectExecution = false - }; + QueryRequestOptions requestOptions = new QueryRequestOptions(); IOrderedQueryable query = testContainer.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions); Func> getQuery = useQuery => useQuery ? query : data.AsQueryable(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs index d16fa48090..48ae5d4464 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs @@ -688,6 +688,7 @@ async Task ImplementationAsync(Container container, IReadOnlyList { foreach (Cosmos.PartitionKey? partitionKey in new Cosmos.PartitionKey?[] { new Cosmos.PartitionKey(5), default }) { + // ODE is set to false to allow for the testing of other pipelines in single partition scenarios QueryRequestOptions feedOptions = new QueryRequestOptions { MaxBufferedItemCount = 7000, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index fc0d585e4e..923f892fa7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -484,10 +484,7 @@ public async Task ChangeFeedAsync() public async Task QueryAsync() { List inputs = new List(); - QueryRequestOptions requestOptions = new QueryRequestOptions() - { - EnableOptimisticDirectExecution = true - }; + QueryRequestOptions requestOptions = new QueryRequestOptions(); int startLineNumber; int endLineNumber; From 2b068e05a5b07441a61164295de6392179dabbd8 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Fri, 19 Jan 2024 11:02:15 -0800 Subject: [PATCH 22/25] Cleaned up code --- .../CosmosBasicQueryTests.cs | 4 ++-- .../Linq/LinqTestsCommon.cs | 4 ++-- .../Query/OptimisticDirectExecutionQueryBaselineTests.cs | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs index 4fbfe8fbfb..19a825e6f9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs @@ -797,7 +797,6 @@ public async Task TesOdeTokenCompatibilityWithNonOdePipeline() QueryRequestOptions queryRequestOptions = new QueryRequestOptions { MaxItemCount = 50, - EnableOptimisticDirectExecution = false }; FeedIteratorInternal feedIterator = @@ -812,6 +811,7 @@ public async Task TesOdeTokenCompatibilityWithNonOdePipeline() QueryRequestOptions newQueryRequestOptions = new QueryRequestOptions { MaxItemCount = 50, + EnableOptimisticDirectExecution = false }; // use Continuation Token to create new iterator and use same trace @@ -826,7 +826,7 @@ public async Task TesOdeTokenCompatibilityWithNonOdePipeline() responseMessage = await feedIteratorNew.ReadNextAsync(CancellationToken.None); } - string expectedErrorMessage = "The continuation token supplied requires the Optimistic Direct Execution flag to be enabled in QueryRequestOptions for the query execution to resume. "; + string expectedErrorMessage = "Execution of this query using the supplied continuation token requires EnableOptimisticDirectExecution to be set in QueryRequestOptions. "; Assert.IsTrue(responseMessage.CosmosException.ToString().Contains(expectedErrorMessage)); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs index 74d8cbdf61..7267e2d920 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs @@ -582,11 +582,11 @@ public static string BuildExceptionMessageForTest(Exception ex) { if (ex is CosmosException cosmosException) { + // ODE scenario: The backend generates an error response message with significant variations when compared to the Service Interop which gets called in the Non ODE scenario. + // The objective is to standardize and normalize the backend response for consistency. Match match = Regex.Match(ex.Message, @"Reason:(.*?}]})", RegexOptions.IgnoreCase); if (match.Success) { - // ODE scenario: The backend generates an error response message with significant variations when compared to the Service Interop. - // The objective is to standardize and normalize the backend response for consistency. string reason = match.Groups[1].Value; reason = reason.Replace("\\", ""); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index e70b1db9a6..9582b754e7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -150,8 +150,7 @@ public void NegativeOptimisticDirectExecutionOutput() public void TestDefaultQueryRequestOptionsSettings() { QueryRequestOptions requestOptions = new QueryRequestOptions(); - bool odeExpectedValue = true; - Assert.AreEqual(odeExpectedValue, requestOptions.EnableOptimisticDirectExecution); + Assert.AreEqual(true, requestOptions.EnableOptimisticDirectExecution); } // test checks that the pipeline can take a query to the backend and returns its associated document(s). From 131112cb84453e8253b46335c8ee1dd7317339e3 Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Fri, 19 Jan 2024 14:33:23 -0800 Subject: [PATCH 23/25] Fixed baselines --- .../EndToEndTraceWriterBaselineTests.QueryAsync.xml | 2 +- .../Linq/LinqTestsCommon.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 552286f4ba..ab07cd8448 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -3846,7 +3846,7 @@ Some Value Some Value Some Value - South Central US,South Central US + South Central US Microsoft.DocumentDB diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs index 7267e2d920..815de90537 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs @@ -585,7 +585,8 @@ public static string BuildExceptionMessageForTest(Exception ex) // ODE scenario: The backend generates an error response message with significant variations when compared to the Service Interop which gets called in the Non ODE scenario. // The objective is to standardize and normalize the backend response for consistency. Match match = Regex.Match(ex.Message, @"Reason:(.*?}]})", RegexOptions.IgnoreCase); - if (match.Success) + Match requestURIMatch = Regex.Match(ex.Message, @"Request URI", RegexOptions.IgnoreCase); + if (match.Success && requestURIMatch.Success) { string reason = match.Groups[1].Value; reason = reason.Replace("\\", ""); From 4ebd3a8d884067ee7b261fc32fbae35b6be9752a Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Fri, 19 Jan 2024 15:43:31 -0800 Subject: [PATCH 24/25] Updated more baselines --- ...lBaselineTests.TestDistinctTranslation.xml | 28 +++++++++---------- ...ralBaselineTests.TestThenByTranslation.xml | 8 ++---- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestDistinctTranslation.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestDistinctTranslation.xml index 612de0f747..44d0b1baf9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestDistinctTranslation.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestDistinctTranslation.xml @@ -404,7 +404,7 @@ JOIN ( WHERE (LENGTH(v2["FamilyName"]) > 10) ORDER BY v2 ASC ]]> - + @@ -423,7 +423,7 @@ JOIN ( WHERE ((LENGTH(v2["FamilyName"]) > 10) AND (LENGTH(v2["FamilyName"]) < 20)) ORDER BY v2 ASC ]]> - + @@ -442,7 +442,7 @@ JOIN ( WHERE ((LENGTH(v2["FamilyName"]) > 10) AND (LENGTH(v2["FamilyName"]) < 20)) ORDER BY v2 ASC ]]> - + @@ -482,7 +482,7 @@ JOIN ( WHERE (LENGTH(v2["FamilyName"]) > 10) ORDER BY v2 ASC ]]> - + @@ -559,7 +559,7 @@ JOIN ( WHERE (LENGTH(v2["FamilyName"]) > 10) ORDER BY v2 ASC ]]> - + @@ -578,7 +578,7 @@ JOIN ( WHERE (LENGTH(v2["FamilyName"]) > 10) ORDER BY v2 ASC ]]> - + @@ -597,7 +597,7 @@ JOIN ( WHERE (LENGTH(v2["FamilyName"]) > 10) ORDER BY v2["GivenName"]["Length"] ASC ]]> - + @@ -616,7 +616,7 @@ JOIN ( WHERE (LENGTH(v2["FamilyName"]) > 10) ORDER BY v2["GivenName"]["Length"] ASC ]]> - + @@ -635,7 +635,7 @@ JOIN ( WHERE (LENGTH(v2["FamilyName"]) > 10) ORDER BY v2 ASC ]]> - + @@ -654,7 +654,7 @@ JOIN ( WHERE (LENGTH(v2["FamilyName"]) > 10) ORDER BY v2 ASC ]]> - + @@ -689,7 +689,7 @@ JOIN ( JOIN v0 IN root["Parents"]) AS v2 ORDER BY v2["FamilyName"] ASC ]]> - + @@ -707,7 +707,7 @@ JOIN ( JOIN v0 IN root["Parents"]) AS v2 ORDER BY v2["FamilyName"] ASC ]]> - + @@ -773,7 +773,7 @@ JOIN ( JOIN p0 IN root["Parents"]) AS v1 ORDER BY v1 ASC ]]> - + @@ -792,7 +792,7 @@ JOIN ( WHERE (LENGTH(v1) > 10) ORDER BY v1 ASC ]]> - + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestThenByTranslation.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestThenByTranslation.xml index 73b8b19748..75054876fc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestThenByTranslation.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestThenByTranslation.xml @@ -119,7 +119,7 @@ JOIN ( SELECT VALUE root FROM root ORDER BY root["FamilyId"] ASC, root["FamilyId"] ASC]]> - + @@ -132,7 +132,7 @@ ORDER BY root["FamilyId"] ASC, root["FamilyId"] ASC]]> SELECT VALUE root FROM root ORDER BY root["FamilyId"] ASC, root["FamilyId"] DESC]]> - + @@ -388,7 +388,6 @@ FROM ( JOIN c0 IN root["Children"]) AS v1) AS r1 ORDER BY r1["FamilyId"] ASC, r1["FamilyNumber"] ASC ]]> - @@ -435,7 +434,6 @@ FROM ( WHERE (p0["GivenName"]["Length"] > 5)) AS v0) AS r0 ORDER BY r0["FamilyId"] ASC, r0["FamilyNumber"] ASC ]]> - @@ -586,7 +584,7 @@ FROM root JOIN f0 IN root["Records"]["Transactions"] WHERE (ARRAY_LENGTH(root["Children"]) > 0) ORDER BY f0["Type"] ASC, f0["Amount"] ASC]]> - + From cd871ad5b4f8cf8f7df0c277cbe8e56275d6ee3c Mon Sep 17 00:00:00 2001 From: Aditya Kotalwar Date: Mon, 22 Jan 2024 15:02:36 -0800 Subject: [PATCH 25/25] Setting QueryRequestRateTest() to not use ODE --- .../CosmosBasicQueryTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs index 19a825e6f9..a50ff87fe0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs @@ -240,6 +240,7 @@ public async Task QueryRequestRateTest(bool directMode) { MaxItemCount = 1, MaxConcurrency = 1, + EnableOptimisticDirectExecution = false, })) { while (feedIterator.HasMoreResults) @@ -268,6 +269,7 @@ public async Task QueryRequestRateTest(bool directMode) { MaxItemCount = 1, MaxConcurrency = 1, + EnableOptimisticDirectExecution = false, }); // First request should be a success