Feature | Add support for enhanced routing feature extension.#3969
Open
Feature | Add support for enhanced routing feature extension.#3969
Conversation
Contributor
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 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports #3643 to main