Skip to content

Comments

Feature | Add support for enhanced routing feature extension.#3969

Open
mdaigle wants to merge 1 commit intomainfrom
dev/mdaigle/enhanced-routing-1
Open

Feature | Add support for enhanced routing feature extension.#3969
mdaigle wants to merge 1 commit intomainfrom
dev/mdaigle/enhanced-routing-1

Conversation

@mdaigle
Copy link
Contributor

@mdaigle mdaigle commented Feb 19, 2026

Ports #3643 to main

Copilot AI review requested due to automatic review settings February 19, 2026 22:32
Copy link
Contributor

Copilot AI left a 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 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

@mdaigle mdaigle linked an issue Feb 19, 2026 that may be closed by this pull request
@mdaigle mdaigle marked this pull request as ready for review February 20, 2026 17:56
@mdaigle mdaigle requested a review from a team as a code owner February 20, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support routing to named read replicas

1 participant