- Notifications
You must be signed in to change notification settings - Fork311
Remove async from SNITcpHandle#2915
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNITcpHandle.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNITcpHandle.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNITcpHandle.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNITcpHandle.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Clarify commentsOnly look for good read socket
codecovbot commentedOct 22, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #2915 +/- ##======================================= Coverage 71.85% 71.86% ======================================= Files 294 294 Lines 60287 60330 +43 =======================================+ Hits 43319 43355 +36- Misses 16968 16975 +7
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. |
1c04120
intodotnet:mainUh oh!
There was an error while loading.Please reload this page.
*For easier code review, hide whitespace changes in this PR.
In our quest to remove async use on sync paths, I've refactored parallel connections in SNITcpHandle.cs. The new code leverages non-blocking sockets and Socket.Select in a single thread to connect in parallel.
To test, I created multiple semi-random entries in my local hosts file like:
And used the following TCPConnectionString in config.json:
Data Source=tcp:test-msf;Database=Northwind;User=sa;Password=...;Encrypt=false;MultiSubnetFailover=true;
Here is a snippet of traces from SNITcpHandle for a failed run (invalid port:
Data Source=tcp:test-msf,1444
):Here is a snippet of traces from SNITcpHandle for a successful run (one valid IP):