-
Notifications
You must be signed in to change notification settings - Fork 321
[6.0] Port #3841 Introduce app context switch for setting MSF=true by default #3852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR ports feature #3841 to the release/6.0 branch, introducing a new AppContext switch EnableMultiSubnetFailoverByDefault that allows users to configure the default value of the MultiSubnetFailover connection string property. The change enables applications to opt-in to using MultiSubnetFailover=true by default, which provides faster connection times in multi-subnet environments through parallel IP connection attempts.
- Added new AppContext switch
EnableMultiSubnetFailoverByDefaultwith default value offalse - Changed
MultiSubnetFailoverdefault from compile-time constant to runtime-configurable value - Added test coverage for the new switch
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
LocalAppContextSwitches.cs |
Adds the new EnableMultiSubnetFailoverByDefault property following the established Tristate lazy initialization pattern |
DbConnectionStringCommon.cs |
Changes MultiSubnetFailover default from const bool to static readonly bool referencing the new switch |
SqlConnectionString.cs |
Updates MultiSubnetFailover default to static readonly bool for consistency with DbConnectionStringDefaults |
LocalAppContextSwitchesTests.cs |
Adds test case verifying the new switch defaults to false |
The implementation follows the established patterns in the codebase for AppContext switches and maintains backwards compatibility by defaulting to false. The changes are consistent across all modified files and properly tested.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/LocalAppContextSwitches.cs
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/6.0 #3852 +/- ##
===============================================
- Coverage 63.68% 62.75% -0.94%
===============================================
Files 285 285
Lines 59152 59160 +8
===============================================
- Hits 37673 37126 -547
- Misses 21479 22034 +555
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Ports #3841 to release/6.0
Issues
AB#41016
Guidelines
Please review the contribution guidelines before submitting a pull request: