Граф коммитов

16077 Коммитов

Автор SHA1 Сообщение Дата
Jiri Cincura ↹ 5d0eba9cc9
Fix test on newest SQL Server (not run on CI ATM) (#35254) 2024-12-02 19:09:52 +00:00
Andriy Svyryd 8aa7bb9291
Uniquify all variables used in SQL Server migration scripts (#35177)
Fixes #35132
2024-12-02 09:50:17 -08:00
dotnet-maestro[bot] c70d281fdb
Update dependencies from https://github.com/dotnet/runtime build 20241201.1 (#35250)
[main] Update dependencies from dotnet/runtime
2024-12-02 14:31:59 +00:00
Jiri Cincura ↹ af19b405f3
Fix Contains on ImmutableArray (#35247) 2024-12-02 14:18:45 +00:00
dotnet-maestro[bot] b706c02564
Update dependencies from https://github.com/dotnet/arcade build 20241128.2 (#35249)
[main] Update dependencies from dotnet/arcade
2024-12-02 14:13:39 +00:00
Arthur Vickers 76d5bef519
Handle comparers for nullable value types in primitive collections (#35235) 2024-11-30 10:08:07 +00:00
Jiri Cincura ↹ 03522db2aa
Fix query filters with context accessors (#35237) 2024-11-30 10:16:37 +02:00
Andrea Canciani e6abfdd937
Avoid using `^` and `~` when invalid because of value converters (#35124)
The transformation of equality/in-equality in a (negated) XOR is only possible
when the expressions are BIT or integer types on the SQL side (i.e. taking value
conversion into account).

Similarly, the Boolean negation `NOT` can be implemented as `~` only if the
underlying expression is a BIT.

Fixes #35093.
2024-11-29 20:22:11 +02:00
Shay Rojansky d1e1dfa531
Simplify parameter names (#35200)
Closes #35113
Fixes #35196
2024-11-26 20:21:31 +01:00
Maurycy Markowski 8d18b1ce0c
Fix to #35212 - Query/Perf: Compile identifier lambdas passed to PopulateIncludeCollection rather than inline (#35213)
PopulateIncludeCollection (as well as couple other methods) take a number of delegate arguments. For scenarios with significant number of entities we see significant perf improvement when these delegates are compiled (like we used to do in EF8), rather than inlined.

Fixes #35212
2024-11-26 09:24:00 -08:00
ajcvickers 20201da1fe
Return null when the type is nullable for Cosmos Max/Min/Average (#35173)
* Return null when the type is nullable for Cosmos Max/Min/Average

Fixes #35094

This was a regression resulting from the major Cosmos query refactoring that happened in EF9. In EF8, the functions Min, Max, and Average would return null if the return type was nullable or was cast to a nullable when the collection is empty. In EF9, this started throwing, which is correct for non-nullable types, but a regression for nullable types.

* Added notes
2024-11-26 17:04:15 +00:00
Maurycy Markowski 1319ed4d68
Fix to #35208 - Query/Perf: don't compile liftable constant resolvers in interpretation mode when the resolver itself contains a lambda (#35209)
In EF9 we changed the way we generate shapers in preparation for AOT scenarios. We no longer can embed arbitrary objects into the shaper, instead we need to provide a way to construct that object in code (using LiftableConstant mechanism), or simulate the functionality it used to provide.
At the end of our processing, we find all liftable constants and for the non-AOT case we compile their resolver lambdas and invoke the result with liftable context object to produce the resulting constant object we initially wanted. (in AOT case we generate code from the resolver lambda).
Problem is that we are compiling the resolver lambda in the interpretation mode - if the final product is itself a delegate, that delegate will itself be in the interpreter mode and therefore less efficient.

Fix is to use regular compilation rather than interpretation.

Fixes #35208

This is part of a fix for a larger perf issue: #35053
2024-11-26 01:58:08 -08:00
dotnet-maestro[bot] 919a6456d0
[main] Update dependencies from dotnet/runtime (#35198)
Microsoft.Extensions.Caching.Memory , Microsoft.Extensions.Configuration , Microsoft.Extensions.Configuration.Abstractions , Microsoft.Extensions.Configuration.EnvironmentVariables , Microsoft.Extensions.Configuration.Json , Microsoft.Extensions.DependencyInjection , Microsoft.Extensions.DependencyModel , Microsoft.Extensions.HostFactoryResolver.Sources , Microsoft.Extensions.Logging , Microsoft.NETCore.App.Ref , Microsoft.NETCore.App.Runtime.win-x64 , System.Formats.Asn1 , System.Runtime.Caching , System.Text.Encodings.Web , System.Text.Json
 From Version 10.0.0-alpha.1.24565.3 -> To Version 10.0.0-alpha.1.24575.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-11-25 17:25:09 -08:00
dependabot[bot] 721395cb8c
Bump Microsoft.AspNetCore.OData from 9.1.0 to 9.1.1 (#35205)
Bumps [Microsoft.AspNetCore.OData](https://github.com/OData/AspNetCoreOData) from 9.1.0 to 9.1.1.
- [Release notes](https://github.com/OData/AspNetCoreOData/releases)
- [Commits](https://github.com/OData/AspNetCoreOData/compare/9.1.0...9.1.1)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.OData
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-25 14:57:39 -08:00
dependabot[bot] f27a2483c3
Bump Grpc.AspNetCore from 2.66.0 to 2.67.0 (#35204)
Bumps [Grpc.AspNetCore](https://github.com/grpc/grpc-dotnet) from 2.66.0 to 2.67.0.
- [Release notes](https://github.com/grpc/grpc-dotnet/releases)
- [Changelog](https://github.com/grpc/grpc-dotnet/blob/master/doc/release_process.md)
- [Commits](https://github.com/grpc/grpc-dotnet/compare/v2.66.0...v2.67.0)

---
updated-dependencies:
- dependency-name: Grpc.AspNetCore
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-25 14:57:20 -08:00
Shay Rojansky 3ba88c4182
Correct VisitUnary operand evaluation in funcletizer (#35172)
Fixes #35152
2024-11-25 16:06:49 +00:00
dotnet-maestro[bot] 664e3bd49b
Update dependencies from https://github.com/dotnet/arcade build 20241122.3 (#35197)
[main] Update dependencies from dotnet/arcade
2024-11-25 13:40:04 +00:00
Shay Rojansky 3cae7a8050
Add missing Converts when simplifying in funcletizer (#35122)
Fixes #35095
2024-11-25 09:50:41 +00:00
Shay Rojansky 3d0b86d07b
Fix TPC equality check inside subquery predicate (#35120)
Fixes #35118
2024-11-25 09:48:02 +00:00
Shay Rojansky 3f5dcef176
Bump Cosmos SDK to 3.46.0 (#35171) 2024-11-21 19:18:10 +00:00
Adeel Mujahid a4a350a6f7
Fix contains test (#35166)
* Fix contains test

* Force non-nullable to nullable using cast
2024-11-21 09:21:52 +01:00
Andriy Svyryd d84faca9c8
Don't remove the annotation in NonNullableConventionBase (#35151) 2024-11-20 09:27:56 -08:00
dependabot[bot] c8e08de4cf
Bump Microsoft.AspNetCore.Identity.EntityFrameworkCore from 8.0.10 to 9.0.0 (#35140)
Bumps [Microsoft.AspNetCore.Identity.EntityFrameworkCore](https://github.com/dotnet/aspnetcore) from 8.0.10 to 9.0.0.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](https://github.com/dotnet/aspnetcore/compare/v8.0.10...v9.0.0)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Identity.EntityFrameworkCore
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 17:19:58 -08:00
Shay Rojansky cda78166c9
Introduce QueryParameterExpression (#35101)
Closes #35089
2024-11-19 18:11:32 +02:00
Adeel Mujahid 89c8ad8559
Fix build with latest roslyn (#35149) 2024-11-19 16:35:23 +01:00
Andriy Svyryd 4a9064c2ab
[automated] Merge branch 'release/9.0' => 'main' (#35138) 2024-11-18 17:51:05 -08:00
dependabot[bot] e7c86cea50
Bump Microsoft.AspNetCore.OData from 9.0.0 to 9.1.0 (#35141)
Bumps [Microsoft.AspNetCore.OData](https://github.com/OData/AspNetCoreOData) from 9.0.0 to 9.1.0.
- [Release notes](https://github.com/OData/AspNetCoreOData/releases)
- [Commits](https://github.com/OData/AspNetCoreOData/compare/9.0.0...9.1.0)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.OData
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 16:53:48 -08:00
dependabot[bot] 5c5f7d2a72
Bump Microsoft.Azure.Cosmos from 3.45.0 to 3.45.2 (#35139)
Bumps [Microsoft.Azure.Cosmos](https://github.com/Azure/azure-cosmos-dotnet-v3) from 3.45.0 to 3.45.2.
- [Release notes](https://github.com/Azure/azure-cosmos-dotnet-v3/releases)
- [Changelog](https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/changelog.md)
- [Commits](https://github.com/Azure/azure-cosmos-dotnet-v3/compare/3.45.0...3.45.2)

---
updated-dependencies:
- dependency-name: Microsoft.Azure.Cosmos
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-18 16:53:29 -08:00
Andriy Svyryd a5f1a40198
Merge branch 'main' into merge/release/9.0-to-main 2024-11-18 16:52:01 -08:00
Shay Rojansky 08b0689825
Set <LangVersion> to preview (#35121)
See #35100
2024-11-19 00:51:00 +02:00
Maurycy Markowski fd921d7004
Partial fix to #35053 - Is EF9 slower than EF8? (#35128)
Don't use Expression.Invoke in ValueComparer.ObjectEqualsExpression.
ValueComparer now contains the information on how to build an expression representing Equals(object, object), which uses Expression.Invoke. We found this to be a major performance problem in some scenarios (e.g. include collection navigation) where that expression is executed large number of times by the result coordinator, as it is part of the parent/outer/selfIdentifierValueComparers.
We actually know the lambda expression that is invoked in advance, so it's much more efficient to just remap the arguments and inline the lambda body into the ObjectEqualsExpression result.

Benchmark results:

ef 8

|                    Method | Async |     Mean |   Error |  StdDev |  Op/s |      Gen0 |      Gen1 | Allocated |
|-------------------------- |------ |---------:|--------:|--------:|------:|----------:|----------:|----------:|
| PredicateMultipleIncludes | False | 147.2 ms | 2.63 ms | 2.46 ms | 6.793 | 4000.0000 | 3000.0000 |  26.24 MB |
| PredicateMultipleIncludes |  True | 159.1 ms | 3.00 ms | 2.95 ms | 6.287 | 5500.0000 | 3000.0000 |  34.47 MB |

ef 9 without this change

|                    Method | Async |     Mean |   Error |  StdDev |  Op/s |       Gen0 |      Gen1 | Allocated |
|-------------------------- |------ |---------:|--------:|--------:|------:|-----------:|----------:|----------:|
| PredicateMultipleIncludes | False | 322.6 ms | 0.97 ms | 0.86 ms | 3.099 | 13000.0000 | 6000.0000 |  79.48 MB |
| PredicateMultipleIncludes |  True | 344.9 ms | 6.79 ms | 6.67 ms | 2.899 | 14000.0000 | 7000.0000 |  87.72 MB |

ef 9 with this change

|                    Method | Async |     Mean |   Error |  StdDev |  Op/s |       Gen0 |      Gen1 | Allocated |
|-------------------------- |------ |---------:|--------:|--------:|------:|-----------:|----------:|----------:|
| PredicateMultipleIncludes | False | 242.8 ms | 2.39 ms | 2.12 ms | 4.119 |  8000.0000 | 5000.0000 |  51.69 MB |
| PredicateMultipleIncludes |  True | 263.4 ms | 2.21 ms | 2.06 ms | 3.797 | 10000.0000 | 9000.0000 |  59.93 MB |

Benchmarks indicate that this change represents a sizable chunk of the perf regression introduced in EF9 by the AOT changes, but doesn't fully address it.

Part of #35053
2024-11-18 10:50:17 -08:00
dotnet-maestro[bot] 448d0b2047
Update dependencies from https://github.com/dotnet/arcade build 20241112.13 (#35137)
[release/9.0] Update dependencies from dotnet/arcade
2024-11-18 15:33:50 +00:00
dotnet-maestro[bot] 7e1b3a6362
Update dependencies from https://github.com/dotnet/runtime build 20241115.3 (#35136)
[main] Update dependencies from dotnet/runtime
2024-11-18 15:05:02 +00:00
dotnet-maestro[bot] 10509b6cc5
Update dependencies from https://github.com/dotnet/arcade build 20241114.1 (#35134)
[main] Update dependencies from dotnet/arcade
2024-11-18 13:54:36 +00:00
Shay Rojansky 9c5d4070c1
Clean up Cosmos PagingExpression namespace (#35123)
Closes #35086
2024-11-17 02:15:42 -08:00
Sam Patel f7bea339a9
Update to .NET9 SDK (#35119) 2024-11-16 10:36:54 -05:00
Andriy Svyryd 893507254a
[automated] Merge branch 'release/9.0' => 'main' (#35054) 2024-11-14 14:27:12 -08:00
Shay Rojansky a3c56773ad
Add missing awaits in MigrationsInfrastructureTestBase (#35106) 2024-11-14 13:50:18 +00:00
ajcvickers dc812a20a1
Move NonNullableConventionState to CoreAnnotationNames (#35020)
This means it gets correctly filtered out when using the model for code generation, and hence we don't try to generate a literal for it.

Fixes #34996
2024-11-14 10:30:03 +00:00
Andriy Svyryd cc9f0f3c5f
[automated] Merge branch 'release/8.0' => 'release/9.0' (#35085) 2024-11-13 18:13:29 -08:00
Andriy Svyryd fa865ed1c8
Merge branch 'release/9.0' into merge/release/8.0-to-release/9.0 2024-11-13 16:10:38 -08:00
Andriy Svyryd 821de16b81
Update NuGet.config 2024-11-13 14:29:20 -08:00
Andriy Svyryd c4d4244eb8
Merge branch 'main' into merge/release/9.0-to-main 2024-11-13 14:28:07 -08:00
Andriy Svyryd cca4eb8958
Merge pull request #35083
Merging internal commits for release/9.0
2024-11-12 15:43:38 -08:00
Andriy Svyryd b111d2a29a
Merge pull request #35081
Merging internal commits for release/8.0
2024-11-12 15:43:14 -08:00
Sean Reeser 3c5b2015b5 Merge commit '645f3131a5b0a4bf677201cf22773990a5316c89' into internal-merge-9.0-2024-11-12-1258 2024-11-12 12:59:04 -08:00
Sean Reeser e99d7c72cc Merge commit '5d020e763f00511c102f94fdf5bf525512d7daaf' into internal-merge-8.0-2024-11-12-1239 2024-11-12 12:39:54 -08:00
ajcvickers 7f639b7fc5
Updating Cosmos version, including using new public APIs (#35074)
Replaces #35002
2024-11-12 11:29:53 +00:00
Andriy Svyryd 7b704c9e27
[automated] Merge branch 'release/8.0' => 'release/9.0' (#35050) 2024-11-11 17:20:10 -08:00
Andriy Svyryd cf6e64ea8d
Merge branch 'release/9.0' into merge/release/8.0-to-release/9.0 2024-11-11 16:27:38 -08:00