-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release Notes for v3.0.0-preview1 (#985)
- Loading branch information
1 parent
c617fa2
commit c37092a
Showing
7 changed files
with
252 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
# Release Notes | ||
|
||
## Microsoft.Data.SqlClient 3.0.0-preview1.21075.2 released 15 March 2021 | ||
|
||
This update brings the below changes over the previous release: | ||
|
||
### Breaking Changes over stable release v2.1 | ||
- The minimum supported .NET Framework version has been increased to v4.6.1. .NET Framework v4.6.0 is no longer supported. [#899](https://github.com/dotnet/SqlClient/pull/899) | ||
|
||
### Added | ||
- Added support for Configurable Retry Logic [#693](https://github.com/dotnet/SqlClient/pull/693) [#966](https://github.com/dotnet/SqlClient/pull/966) [Read more](#configurable-retry-logic) | ||
- Added support for Event counters in .NET Core 3.1+ and .NET Standard 2.1+ [#719](https://github.com/dotnet/SqlClient/pull/719) [Read more](#event-counters) | ||
- Added support for Assembly Context Unloading in .NET Core [#913](https://github.com/dotnet/SqlClient/pull/913) | ||
- Added missing `System.Runtime.Caching` dependency for .NET Standard assemblies [#877](https://github.com/dotnet/SqlClient/pull/877) | ||
|
||
### Fixed | ||
- Fixed wrong results issues by changing the timeout timer to ensure a correct execution state [#906](https://github.com/dotnet/SqlClient/pull/906) | ||
- Fixed Kerberos authentication issues when configured Server Principal Name (SPN) didn't contain default port [#930](https://github.com/dotnet/SqlClient/pull/930) | ||
- Fixed MARS header errors when `MakeReadAsyncBlocking` App Context switch is set to `false` [#910](https://github.com/dotnet/SqlClient/pull/910) [#922](https://github.com/dotnet/SqlClient/pull/922) | ||
- Fixed unwanted exceptions being thrown from `SqlDataReader.Dispose` [#920](https://github.com/dotnet/SqlClient/pull/920) | ||
- Fixed issues connecting to SQL Server instance with instance name specified from Unix environment [#870](https://github.com/dotnet/SqlClient/pull/870) | ||
- Fixed TCP Keep Alive issues in .NET Core [#854](https://github.com/dotnet/SqlClient/pull/854) | ||
- Fixed Kerberos Authentication issues caused due to regression [#845](https://github.com/dotnet/SqlClient/pull/845) | ||
- Fixed issues with System-Assigned Managed Identity in Azure Functions [#829](https://github.com/dotnet/SqlClient/pull/829) | ||
- Fixed missing error messages in Managed SNI [#882](https://github.com/dotnet/SqlClient/pull/882) | ||
- Fixed event source trace string issue [#940](https://github.com/dotnet/SqlClient/pull/940) | ||
|
||
### Changes | ||
- Changed App Context switch `MakeReadAsyncBlocking` default to `false` [#937](https://github.com/dotnet/SqlClient/pull/937) | ||
- Replaced usage of `BinaryFormatter` with `DataContractSerializer` [#869](https://github.com/dotnet/SqlClient/pull/869) | ||
- Prohibited `DtdProcessing` on `XmlTextReader` instance in .NET Core [#884](https://github.com/dotnet/SqlClient/pull/884) | ||
- Improved performance by reducing memory allocations in `SerializeEncodingChar`/`WriteEncodingChar` and some options boxing [#785](https://github.com/dotnet/SqlClient/pull/785) | ||
- Improved performance by preventing orphaned active packets being GC'ed without clear [#888](https://github.com/dotnet/SqlClient/pull/888) | ||
- Various performance improvements [#889](https://github.com/dotnet/SqlClient/pull/889) [#900](https://github.com/dotnet/SqlClient/pull/900) | ||
- Partial event source tracing improvements in .NET Core [#867](https://github.com/dotnet/SqlClient/pull/867) [#897](https://github.com/dotnet/SqlClient/pull/897) | ||
- Changes to share common files between NetFx and NetCore source code [#827](https://github.com/dotnet/SqlClient/pull/827) [#835](https://github.com/dotnet/SqlClient/pull/835) [#838](https://github.com/dotnet/SqlClient/pull/838) [#881](https://github.com/dotnet/SqlClient/pull/881) | ||
|
||
|
||
## New features over stable release v2.1 | ||
|
||
### Configurable Retry Logic | ||
|
||
This new feature introduces configurable support for client applications to retry on "transient" or "retriable" errors. Configuration can be done through code or app config files and retry operations can be applied to opening a connection or executing a command. This feature is disabled by default and is currently in preview. To enable this support, client applications must turn on the following safety switch: | ||
|
||
`AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.EnableRetryLogic", true);` | ||
|
||
Once the .NET AppContext switch is enabled, a retry logic policy can be defined for `SqlConnection` and `SqlCommand` independently, or together using various customization options. | ||
|
||
New public APIs are introduced in `SqlConnection` and `SqlCommand` for registering a custom `SqlRetryLogicBaseProvider` implementation: | ||
|
||
```cs | ||
public SqlConnection | ||
{ | ||
public SqlRetryLogicBaseProvider RetryLogicProvider; | ||
} | ||
|
||
public SqlCommand | ||
{ | ||
public SqlRetryLogicBaseProvider RetryLogicProvider; | ||
} | ||
|
||
``` | ||
|
||
API Usage examples can be found here: | ||
[SqlConnection retry sample](..\..\doc\samples\SqlConfigurableRetryLogic_OpenConnection.cs) | ||
[SqlCommand retry sample](..\..\doc\samples\SqlConfigurableRetryLogic_SqlCommand.cs) | ||
[Sample for retry logic options](..\..\doc\samples\SqlConfigurableRetryLogic_SqlRetryLogicOptions.cs) | ||
|
||
New configuration sections have also been introduced to do the same registration from configuration files, without having to modify existing code: | ||
|
||
```xml | ||
<section name="SqlConfigurableRetryLogicConnection" | ||
type="Microsoft.Data.SqlClient.SqlConfigurableRetryConnectionSection, Microsoft.Data.SqlClient"/> | ||
|
||
<section name="SqlConfigurableRetryLogicCommand" | ||
type="Microsoft.Data.SqlClient.SqlConfigurableRetryCommandSection, Microsoft.Data.SqlClient"/> | ||
``` | ||
|
||
A simple example of using the new configuration sections in configuration files is below: | ||
|
||
```xml | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<configSections> | ||
<section name="SqlConfigurableRetryLogicConnection" | ||
type="Microsoft.Data.SqlClient.SqlConfigurableRetryConnectionSection, Microsoft.Data.SqlClient"/> | ||
<section name="SqlConfigurableRetryLogicCommand" | ||
type="Microsoft.Data.SqlClient.SqlConfigurableRetryCommandSection, Microsoft.Data.SqlClient"/> | ||
|
||
<section name="AppContextSwitchOverrides" | ||
type="Microsoft.Data.SqlClient.AppContextSwitchOverridesSection, Microsoft.Data.SqlClient"/> | ||
</configSections> | ||
|
||
<!--Enable safety switch in .NET Core--> | ||
<AppContextSwitchOverrides value="Switch.Microsoft.Data.SqlClient.EnableRetryLogic=true"/> | ||
|
||
<!--Retry method for SqlConnection--> | ||
<SqlConfigurableRetryLogicConnection retryMethod ="CreateFixedRetryProvider" numberOfTries ="3" deltaTime ="00:00:10" maxTime ="00:00:30" | ||
transientErrors="40615" /> | ||
|
||
<!--Retry method for SqlCommand containing SELECT queries--> | ||
<SqlConfigurableRetryLogicCommand retryMethod ="CreateIncrementalRetryProvider" numberOfTries ="5" deltaTime ="00:00:10" maxTime ="00:01:10" | ||
authorizedSqlCondition="\b(SELECT)\b" transientErrors="102, 4060, 0"/> | ||
</configuration> | ||
``` | ||
|
||
Alternatively, applications can implement their own provider of the `SqlRetryLogicBaseProvider` base class, and register it with `SqlConnection`/`SqlCommand`. | ||
|
||
### Event Counters | ||
|
||
The following counters are now available for applications targeting .NET Core 3.1+ and .NET Standard 2.1+: | ||
|
||
- **HardConnects**: The number of physical connections that are being made. | ||
- **HardDisconnects**: The number of actual disconnects that are being made. | ||
- **ActiveHardConnections**: The number of active physical connections that are being made. | ||
- **SoftConnects**: The number of connections acquired from the pool. | ||
- **SoftDisconnects**: The number of connections returned to the pool. | ||
- **ActiveSoftConnections**: The total number of active pooled connections. | ||
- **NumberOfNonPooledConnections**: The total number of non-pooled connections. | ||
- **NumberOfPooledConnections**: The total number of pooled connections. | ||
- **NumberOfActiveConnectionPoolGroups**: The number of unique connection pool groups. | ||
- **NumberOfInactiveConnectionPoolGroups**: The number of unique connection pool groups to be pruned. | ||
- **NumberOfActiveConnectionPools**: The number of active connection pools. | ||
- **NumberOfInactiveConnectionPools**: The number of inactive connection pools. | ||
- **NumberOfActiveConnections**: The number of active connections currently in-use. | ||
- **NumberOfFreeConnections**: The number of free connections available for use. | ||
- **NumberOfStasisConnections**: The number of active free connections with open transactions. | ||
- **NumberOfReclaimedConnections**: The number of connections reclaimed from GC'd external connections. | ||
|
||
These counters can be used with .NET Core global CLI tools: `dotnet-counters` and `dotnet-trace` in Windows or Linux and PerfView in Windows, using `Microsoft.Data.SqlClient.EventSource` as the provider name. | ||
|
||
```cmd | ||
dotnet-counters monitor Microsoft.Data.SqlClient.EventSource -p | ||
PerfView /onlyProviders=*Microsoft.Data.SqlClient.EventSource:EventCounterIntervalSec=1 collect | ||
``` | ||
|
||
## Target Platform Support | ||
|
||
- .NET Framework 4.6.1+ (Windows x86, Windows x64) | ||
- .NET Core 2.1+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) | ||
- .NET Standard 2.0+ (Windows x86, Windows x64, Windows ARM64, Windows ARM, Linux, macOS) | ||
|
||
### Dependencies | ||
|
||
#### .NET Framework 4.6.1 | ||
|
||
- Microsoft.Data.SqlClient.SNI 2.1.1 | ||
- Microsoft.Identity.Client 4.21.1 | ||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 | ||
- Microsoft.IdentityModel.JsonWebTokens 6.8.0 | ||
|
||
#### .NET Core 2.1 | ||
|
||
- Microsoft.Data.SqlClient.SNI.runtime 2.1.1 | ||
- Microsoft.Win32.Registry 4.7.0 | ||
- System.Security.Principal.Windows 4.7.0 | ||
- System.Text.Encoding.CodePages 4.7.0 | ||
- System.Diagnostics.DiagnosticSource 4.7.0 | ||
- System.Configuration.ConfigurationManager 4.7.0 | ||
- System.Runtime.Caching 4.7.0 | ||
- Microsoft.Identity.Client 4.21.1 | ||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 | ||
- Microsoft.IdentityModel.JsonWebTokens 6.8.0 | ||
|
||
#### .NET Core 3.1 | ||
|
||
- Microsoft.Data.SqlClient.SNI.runtime 2.1.1 | ||
- Microsoft.Win32.Registry 4.7.0 | ||
- System.Security.Principal.Windows 4.7.0 | ||
- System.Text.Encoding.CodePages 4.7.0 | ||
- System.Diagnostics.DiagnosticSource 4.7.0 | ||
- System.Configuration.ConfigurationManager 4.7.0 | ||
- System.Runtime.Caching 4.7.0 | ||
- Microsoft.Identity.Client 4.21.1 | ||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 | ||
- Microsoft.IdentityModel.JsonWebTokens 6.8.0 | ||
|
||
#### .NET Standard 2.0 | ||
|
||
- Microsoft.Data.SqlClient.SNI.runtime 2.1.1 | ||
- Microsoft.Win32.Registry 4.7.0 | ||
- System.Buffers 4.5.1 | ||
- System.Memory 4.5.4 | ||
- System.Security.Principal.Windows 4.7.0 | ||
- System.Text.Encoding.CodePages 4.7.0 | ||
- System.Runtime.Caching 4.7.0 | ||
- Microsoft.Identity.Client 4.21.1 | ||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 | ||
- Microsoft.IdentityModel.JsonWebTokens 6.8.0 | ||
|
||
#### .NET Standard 2.1 | ||
|
||
- Microsoft.Data.SqlClient.SNI.runtime 2.1.1 | ||
- Microsoft.Win32.Registry 4.7.0 | ||
- System.Buffers 4.5.1 | ||
- System.Memory 4.5.4 | ||
- System.Security.Principal.Windows 4.7.0 | ||
- System.Text.Encoding.CodePages 4.7.0 | ||
- System.Runtime.Caching 4.7.0 | ||
- Microsoft.Identity.Client 4.21.1 | ||
- Microsoft.IdentityModel.Protocols.OpenIdConnect 6.8.0 | ||
- Microsoft.IdentityModel.JsonWebTokens 6.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Microsoft.Data.SqlClient 3.0 Releases | ||
|
||
The following Microsoft.Data.SqlClient 3.0 preview releases have been shipped: | ||
|
||
| Release Date | Version | Notes | | ||
| :-- | :-- | :--: | | ||
| 2021/03/15 | 3.0.0-preview1.21075.2 | [release notes](3.0.0-preview1.md) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Microsoft.Data.SqlClient 3.0 Releases | ||
|
||
The following Microsoft.Data.SqlClient 3.0 preview releases have been shipped: | ||
|
||
| Release Date | Version | Notes | | ||
| :-- | :-- | :--: | | ||
| 2021/03/15 | 3.0.0-preview1.21075.2 | [release notes](3.0.0-preview1.md) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters