dotnet / dotnet/SqlClient

.NET 5.0 | Implement SqlException.IsTransient

Open
#649 19 comments 11 reactions 0 assignees View on GitHub
Approved Up-for-Grabs :raised_hands:
Dominant language
C#
Stars
989
Forks
340
Avg merge
4d 18h
Merged PRs (30d)
69

Description

https://github.com/dotnet/runtime/issues/34817 introduces DbException.IsTransient for .NET 5.0, database-agnostic transient error detection. Note that this is orthogonal to SqlClient's own resilient connection mechanism - IsTransient is only about surfacing error transience to external retry strategies/policies such as Polly.

Note that EF Core's SQL Server provider has [a transient exception detector](https://github.com/dotnet/efcore/blob/bde2b140d6f4cf94d6d1285d402941e20193ec60/src/EFCore.SqlServer/Storage/Internal/SqlServerTransientExceptionDetector.cs), this could be a starting point for implementing this within SqlClient. The goal would eventually be for EF Core to rely on the new IsTransient property rather than contain specific knowledge on SqlClient error codes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.