Feature | Add support for enhanced routing feature extension.#3969
Feature | Add support for enhanced routing feature extension.#3969
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds support for the Enhanced Routing feature extension to the TDS protocol implementation. Enhanced Routing is a TDS 8.0 feature that allows SQL Server to negotiate advanced routing capabilities during connection establishment. The implementation follows the established pattern for feature extensions in Microsoft.Data.SqlClient.
Changes:
- Adds TDS protocol support for Enhanced Routing feature extension (ID 0x0F) with request/acknowledgment handling
- Implements test infrastructure to validate client-server feature negotiation with three scenarios (enabled, disabled, not acknowledged)
- Refactors TDS.Servers.csproj to remove explicit file enumeration, allowing SDK-style implicit compilation
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsEnums.cs |
Adds constant FEATUREEXT_ENHANCEDROUTINGSUPPORT (0x0F) and flag EnhancedRoutingSupport to FeatureExtension enum |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs |
Implements WriteEnhancedRoutingSupportFeatureRequest to send feature request with no payload, adds call in ApplyFeatureExData |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Connection/SqlConnectionInternal.cs |
Adds IsEnhancedRoutingSupportEnabled flag, implements acknowledgment handler in OnFeatureExtAck, adds feature to login request |
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS/TDSFeatureID.cs |
Adds EnhancedRoutingSupport (0x0F) to test TDS feature ID enum |
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.Servers/FeatureExtensionEnablementTriState.cs |
New enum for test server tri-state feature control (Disabled, Enabled, DoNotAcknowledge) |
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.EndPoint/ITDSServerSession.cs |
Adds IsEnhancedRoutingSupportEnabled property to server session interface |
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.Servers/GenericTdsServerSession.cs |
Implements IsEnhancedRoutingSupportEnabled property for test server sessions |
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.Servers/GenericTdsServer.cs |
Adds EnableEnhancedRouting property, implements feature request handling in OnLogin7Request, adds CheckEnhancedRoutingSupport method for acknowledgment generation |
src/Microsoft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/FeatureExtensionNegotiationTests.cs |
New test file with three test scenarios for enhanced routing negotiation (enabled, disabled, not acknowledged) |
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.Servers/TDS.Servers.csproj |
Removes EnableDefaultCompileItems and explicit <Compile> elements to use SDK-style implicit file inclusion |
...soft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/FeatureExtensionNegotiationTests.cs
Show resolved
Hide resolved
...soft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/FeatureExtensionNegotiationTests.cs
Show resolved
Hide resolved
...soft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/FeatureExtensionNegotiationTests.cs
Outdated
Show resolved
Hide resolved
...soft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/FeatureExtensionNegotiationTests.cs
Show resolved
Hide resolved
...soft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/FeatureExtensionNegotiationTests.cs
Show resolved
Hide resolved
...soft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/FeatureExtensionNegotiationTests.cs
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3969 +/- ##
===========================================
- Coverage 75.22% 64.45% -10.77%
===========================================
Files 266 282 +16
Lines 42932 65951 +23019
===========================================
+ Hits 32294 42512 +10218
- Misses 10638 23439 +12801
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:
|
Ports #3643 to main