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

Fix transient fault handling for Pooled connections #637

Merged

Conversation

cheenamalhotra
Copy link
Member

@cheenamalhotra cheenamalhotra commented Jul 8, 2020

All versions of SqlClient (including System.Data.SqlClient) that support Transient Fault Handling do not reset the connection before retrying for transient fault handling cases and if Azure connections fail to connect first time due to server timeout, the next round of connect fails with below error:

Type=System.InvalidOperationException.Message=Internal .Net Framework Data Provider error 6.

When pooling is disabled, apps are able to connect with Transient Fault Handling.
The PR fixes this issue for pooled connections.

NuGet package for testing: Published Artifacts

@cheenamalhotra cheenamalhotra added this to In progress in SqlClient v2.1 via automation Jul 8, 2020
@cheenamalhotra cheenamalhotra moved this from In progress to Review in progress in SqlClient v2.1 Jul 8, 2020
@cheenamalhotra cheenamalhotra added this to the 2.1.0-preview1 milestone Jul 8, 2020
SqlClient v2.1 automation moved this from Review in progress to Reviewer approved Jul 8, 2020
@JRahnama
Copy link
Member

JRahnama commented Jul 8, 2020

Logic wise LGM, but how can we test transient errors? Is it possible to have tests to do so?

@cheenamalhotra
Copy link
Member Author

Transient errors occur on Database side, so I don't think we can trigger faults on server side.

@cheenamalhotra cheenamalhotra merged commit 415262d into dotnet:master Jul 21, 2020
SqlClient v2.1 automation moved this from Reviewer approved to Done Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants