-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HttpConnectionPool improvements #62935
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsTwo related improvements: (1) Reduce contention on the pool lock. This is done mainly by (a) not calling TrySetResult on the queued waiter under the lock -- instead, do this outside the lock and retry as necessary for canceled requests; (b) avoid doing diagnostic logging under the lock. Fixes #60654
|
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
@dotnet/ncl Can I get a review? |
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
Show resolved
Hide resolved
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
Show resolved
Hide resolved
src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Cancellation.cs
Outdated
Show resolved
Hide resolved
I pushed fixes for the issues identified above. |
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
Two related improvements:
(1) Reduce contention on the pool lock. This is done mainly by (a) not calling TrySetResult on the queued waiter under the lock -- instead, do this outside the lock and retry as necessary for canceled requests; (b) avoid doing diagnostic logging under the lock.
(2) Improve handling of failed connection attempts so we don't fail requests unnecessarily. See #60654 for details.
Fixes #60654