Is your feature request related to a problem? Please describe.
Switch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWait currently defaults to false for compatibility. As a result, pool waits and subsequent network operations can each receive a fresh Connect Timeout budget, allowing SqlConnection.Open and OpenAsync to exceed the caller's configured overall timeout.
The switch was introduced in #4270 to opt into propagating one timeout budget through connection pooling. Related issue #4582 tracks remaining in-open round trips that also need to honor that budget.
Describe the solution you'd like
Change Switch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWait to default to true in Microsoft.Data.SqlClient 8.0. Explicitly setting the switch to false should retain the legacy behavior as a compatibility escape hatch.
Update the switch documentation and tests to cover:
- The new default value.
- Explicit
false preserving legacy pool-wait timeout behavior.
- Sync and async connection-opening paths.
- Both
WaitHandleDbConnectionPool and ChannelDbConnectionPool where applicable.
Describe alternatives you've considered
Keep the default at false and require applications to opt in. This preserves existing behavior but leaves the configured Connect Timeout unable to act as one overall connection-opening budget by default.
Additional context
This is an intentional default behavior change for the 8.0 major release. The current switch definition and tests assert a default of false.
Is your feature request related to a problem? Please describe.
Switch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWaitcurrently defaults tofalsefor compatibility. As a result, pool waits and subsequent network operations can each receive a freshConnect Timeoutbudget, allowingSqlConnection.OpenandOpenAsyncto exceed the caller's configured overall timeout.The switch was introduced in #4270 to opt into propagating one timeout budget through connection pooling. Related issue #4582 tracks remaining in-open round trips that also need to honor that budget.
Describe the solution you'd like
Change
Switch.Microsoft.Data.SqlClient.UseOverallConnectTimeoutForPoolWaitto default totruein Microsoft.Data.SqlClient 8.0. Explicitly setting the switch tofalseshould retain the legacy behavior as a compatibility escape hatch.Update the switch documentation and tests to cover:
falsepreserving legacy pool-wait timeout behavior.WaitHandleDbConnectionPoolandChannelDbConnectionPoolwhere applicable.Describe alternatives you've considered
Keep the default at
falseand require applications to opt in. This preserves existing behavior but leaves the configuredConnect Timeoutunable to act as one overall connection-opening budget by default.Additional context
This is an intentional default behavior change for the 8.0 major release. The current switch definition and tests assert a default of
false.