-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/9.0-staging] Remove thread contention from Activity Start/Stop #109359
Merged
tarekgh
merged 8 commits into
release/9.0-staging
from
backport/pr-107333-to-release/9.0-staging
Nov 5, 2024
Merged
[release/9.0-staging] Remove thread contention from Activity Start/Stop #109359
tarekgh
merged 8 commits into
release/9.0-staging
from
backport/pr-107333-to-release/9.0-staging
Nov 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author: algorithmsarecool <[email protected]>
Author: algorithmsarecool<[email protected]>
…bvious - Use IndexOf Author: algorithmsarecool <[email protected]>
tarekgh
added
area-System.Diagnostics.Activity
and removed
area-System.Diagnostics.Tracing
labels
Oct 29, 2024
Tagging subscribers to this area: @dotnet/area-system-diagnostics-activity |
noahfalk
approved these changes
Oct 29, 2024
Open
3 tasks
rbhanda
added
Servicing-approved
Approved for servicing release
and removed
Servicing-consider
Issue for next servicing release review
labels
Nov 5, 2024
danmoseley
reviewed
Nov 5, 2024
src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs
Show resolved
Hide resolved
carlossanlop
pushed a commit
to carlossanlop/runtime
that referenced
this pull request
Nov 7, 2024
…op (dotnet#109359) * Remove thread contention from Activity Start/Stop Author: algorithmsarecool <[email protected]> * Fix ref parameters and whitespace Author: algorithmsarecool<[email protected]> * PR feedback. - Reduce duplication - add comments and make code more obvious - Use IndexOf Author: algorithmsarecool <[email protected]> * PR feedback to simplify locking strategy * PR feedback, final nits * package authoring * Fix package authoring * revert package authoring as it is not needed anymore in net9.0 --------- Co-authored-by: algorithmsarecool <[email protected]> Co-authored-by: Tarek Mahmoud Sayed <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #109060
Backport of #107333 to release/9.0-staging
/cc @tarekgh @AlgorithmsAreCool
Customer Impact
Users running tracing in high-throughput scenarios may experience lock contention, which can lead to performance degradation in their applications or services.
Regression
While this isn't a regression, it appears that users have started enabling scenarios that lead to this issue. We may expect this get reported more in the near future if we don't service this fix.
Testing
Manual testing, #107333 (comment) has some numbers before and after fix. Also, we have provided a private built package to the customer who reported the issue, and they have confirmed the fix resolve their issue. #109060 (comment)
Risk
Medium to low risk. The whole change is touching the type we use for caching which was causing the lock contention. The fix didn't change any actual functional behavior more than avoiding the lock when notifying the listeners.
IMPORTANT: If this backport is for a servicing release, please verify that:
The PR target branch is
release/X.0-staging
, notrelease/X.0
.If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.