From acedaca3ab7c28eb7a2d78e616f7d5b48453e9a0 Mon Sep 17 00:00:00 2001 From: kirankumarkolli Date: Mon, 10 Aug 2020 20:37:04 +0530 Subject: [PATCH 1/8] Performance: Adds includes compiler optimize option --- .../Tools/Benchmark/CosmosBenchmark.csproj | 3 ++- Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj index fd9af52508..8ec84087f9 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj @@ -4,7 +4,8 @@ netcoreapp3.1 CosmosBenchmark CosmosBenchmark - true + true + true diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index 52e330d396..823330d523 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -39,6 +39,7 @@ false Microsoft.Azure.Cosmos NU5125 + true From 51dbaccb494d4aa957e16f1d03c64c385a682dba Mon Sep 17 00:00:00 2001 From: kirankumarkolli Date: Mon, 10 Aug 2020 22:08:34 +0530 Subject: [PATCH 2/8] Update Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj Co-authored-by: Matias Quaranta --- Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index 823330d523..130ca81b0a 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -39,7 +39,7 @@ false Microsoft.Azure.Cosmos NU5125 - true + true From 23eed85c202ee39c71ba212af3f072864da3f325 Mon Sep 17 00:00:00 2001 From: kirankumarkolli Date: Mon, 10 Aug 2020 22:08:42 +0530 Subject: [PATCH 3/8] Update Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj Co-authored-by: Matias Quaranta --- .../Tools/Benchmark/CosmosBenchmark.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj index 8ec84087f9..0b68f92bb5 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj @@ -5,7 +5,7 @@ CosmosBenchmark CosmosBenchmark true - true + true @@ -34,4 +34,4 @@ - \ No newline at end of file + From 8777e51afed3d5f26bd2c84ff807f6d6240d6c49 Mon Sep 17 00:00:00 2001 From: j82w Date: Mon, 10 Aug 2020 13:31:07 -0700 Subject: [PATCH 4/8] [Internal] Tests: Fixes bad debug assert causing test failures (#1766) --- Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs b/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs index 9fcf5cdf7a..83d590595a 100644 --- a/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs +++ b/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs @@ -125,8 +125,8 @@ public virtual async Task SendAsync( // user request might span multiple backend requests. // This will still have a single request id for retry scenarios ActivityScope activityScope = ActivityScope.CreateIfDefaultActivityId(); - Debug.Assert(activityScope != null && - (operationType != OperationType.SqlQuery || operationType != OperationType.Query || operationType != OperationType.QueryPlan), + Debug.Assert(activityScope == null || (activityScope != null && + (operationType != OperationType.SqlQuery || operationType != OperationType.Query || operationType != OperationType.QueryPlan)), "There should be an activity id already set"); try From 3166eb69636e2f3ef569aa69c476e691c303e41d Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Mon, 10 Aug 2020 14:49:18 -0700 Subject: [PATCH 5/8] [Internal] Tests: Fixes tests configuration (#1767) Co-authored-by: j82w --- templates/build-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/build-test.yml b/templates/build-test.yml index 5da0bf406b..3942d9dbf8 100644 --- a/templates/build-test.yml +++ b/templates/build-test.yml @@ -8,7 +8,7 @@ parameters: jobs: - job: - displayName: Tests ${{ parameters.BuildConfiguration }} + displayName: Tests Debug pool: vmImage: ${{ parameters.VmImage }} @@ -22,7 +22,7 @@ jobs: inputs: command: test projects: 'Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/*.csproj' - arguments: ${{ parameters.Arguments }} --configuration ${{ parameters.BuildConfiguration }} /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CopyLocalLockFileAssemblies=true /p:OS=${{ parameters.OS }} + arguments: ${{ parameters.Arguments }} --configuration Debug /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CopyLocalLockFileAssemblies=true /p:OS=${{ parameters.OS }} publishTestResults: true nugetConfigPath: NuGet.config testRunTitle: Microsoft.Azure.Cosmos.Tests From dd54286702e7f2e9dc33ad7aee527f82638b718b Mon Sep 17 00:00:00 2001 From: kirankumarkolli Date: Mon, 10 Aug 2020 20:37:04 +0530 Subject: [PATCH 6/8] Performance: Adds includes compiler optimize option --- .../Tools/Benchmark/CosmosBenchmark.csproj | 3 ++- Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj index fd9af52508..8ec84087f9 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj @@ -4,7 +4,8 @@ netcoreapp3.1 CosmosBenchmark CosmosBenchmark - true + true + true diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index 52e330d396..823330d523 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -39,6 +39,7 @@ false Microsoft.Azure.Cosmos NU5125 + true From b84fc59efa7e0c7f532f3a546d2fb2fd6e6e1963 Mon Sep 17 00:00:00 2001 From: kirankumarkolli Date: Mon, 10 Aug 2020 22:08:34 +0530 Subject: [PATCH 7/8] Update Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj Co-authored-by: Matias Quaranta --- Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index 823330d523..130ca81b0a 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -39,7 +39,7 @@ false Microsoft.Azure.Cosmos NU5125 - true + true From bb4809b25894a932382c36e6daa276781708526a Mon Sep 17 00:00:00 2001 From: kirankumarkolli Date: Mon, 10 Aug 2020 22:08:42 +0530 Subject: [PATCH 8/8] Update Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj Co-authored-by: Matias Quaranta --- .../Tools/Benchmark/CosmosBenchmark.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj index 8ec84087f9..0b68f92bb5 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.csproj @@ -5,7 +5,7 @@ CosmosBenchmark CosmosBenchmark true - true + true @@ -34,4 +34,4 @@ - \ No newline at end of file +