Skip to content

Comments

[release/6.0] Avoid issuing connection attempts for already cancelled requests#67226

Merged
carlossanlop merged 1 commit intodotnet:release/6.0from
MihaZupan:backport-8c7120
Apr 13, 2022
Merged

[release/6.0] Avoid issuing connection attempts for already cancelled requests#67226
carlossanlop merged 1 commit intodotnet:release/6.0from
MihaZupan:backport-8c7120

Conversation

@MihaZupan
Copy link
Member

@MihaZupan MihaZupan commented Mar 28, 2022

Fixes #66990
Backport of #66992 to release/6.0

Customer Impact

Discovered when analyzing Dynamics memory leak when upgrading .NET Core 3.1 to 6.0 - see details in #66673 (comment).
Reduces the chance of a memory leak if an endpoint becomes unresponsive and new connections can't be established.

Greatly reduces the amount of work & time needed to process already-cancelled requests when no connections are available.

Testing

Added a targeted test case for the new behavior.
We have existing test coverage to ensure nothing regressed.

Risk

Low -- small change affecting only already-canceled requests.

…net#66992)

* Avoid issuing connection attempts for already canceled requests

* Cancelled => Canceled

* Guard SocketsHttpHandler tests under SocketsHttpHandler.IsSupported
@MihaZupan MihaZupan added this to the 6.0.x milestone Mar 28, 2022
@ghost ghost assigned MihaZupan Mar 28, 2022
@ghost
Copy link

ghost commented Mar 28, 2022

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #66990
Backport of #66992 to release/6.0

Customer Impact

Greatly reduce the amount of work & time needed to process already-canceled requests when no connections are available.
Reduces the chance of a memory leak if an endpoint becomes unresponsive and new connections can't be established.

Testing

Added a targeted test case for the new behavior.
We have existing test coverage to ensure nothing regressed.

Risk

Low -- small change affecting only already-canceled requests.

Author: MihaZupan
Assignees: -
Labels:

area-System.Net.Http

Milestone: 6.0.x

@MihaZupan
Copy link
Member Author

CI failures are unrelated to this change:

@MihaZupan MihaZupan added the Servicing-consider Issue for next servicing release review label Mar 29, 2022
@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Apr 5, 2022
@leecow leecow modified the milestones: 6.0.x, 6.0.5 Apr 5, 2022
@carlossanlop carlossanlop merged commit 9fb197d into dotnet:release/6.0 Apr 13, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Net.Http Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants