Skip to content
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

Different behavior for Routing in netcore and netfx #2872

Closed
JRahnama opened this issue Sep 19, 2024 · 3 comments · Fixed by #2873
Closed

Different behavior for Routing in netcore and netfx #2872

JRahnama opened this issue Sep 19, 2024 · 3 comments · Fixed by #2873
Labels
🐛 Bug! Issues that are bugs in the drivers we maintain.

Comments

@JRahnama
Copy link
Contributor

There are two different behavior for Routing in SqlClient

in .Net inside SqlInternalConnectionTds we have

if (routingAttempts > 0)
                        {
                            throw SQL.ROR_RecursiveRoutingNotSupported(this);
                        }

Where as the same place in .NetFramework we have

if (routingAttempts > _maxNumberOfRedirectRoute)
                        {
                            throw SQL.ROR_RecursiveRoutingNotSupported(this);
                        }

_maxNumberOfRedirectRout is 10

@JRahnama JRahnama added 🆕 Triage Needed For new issues, not triaged yet. 🐛 Bug! Issues that are bugs in the drivers we maintain. labels Sep 19, 2024
@JRahnama
Copy link
Contributor Author

JRahnama commented Sep 19, 2024

@David-Engel, @saurabh500 can you confirm that netcore should follow the same logic as netfx?

@David-Engel
Copy link
Contributor

@JRahnama

I noticed this a little while ago and looked into the history a bit. The max routing attempts changes was included as part of the Azure read only routing support changes in SDS netfx. I saved a branch of what I thought were the relevant changes required from bring everything from the netfx to the netcore MDS code: https://github.com/dotnet/SqlClient/compare/main...David-Engel:SqlClient:port?expand=1

@JRahnama
Copy link
Contributor Author

@JRahnama

I noticed this a little while ago and looked into the history a bit. The max routing attempts changes was included as part of the Azure read only routing support changes in SDS netfx. I saved a branch of what I thought were the relevant changes required from bring everything from the netfx to the netcore MDS code: https://github.com/dotnet/SqlClient/compare/main...David-Engel:SqlClient:port?expand=1

Thanks David, I have updated the PR #2873 with some extra changes and addressed some issues in your changes.

@kf-gonzalez2 kf-gonzalez2 removed the 🆕 Triage Needed For new issues, not triaged yet. label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug! Issues that are bugs in the drivers we maintain.
Projects
3 participants