-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracing: fix inconsistent lock ordering when notifying event listeners
This change fixes an inconsistent lock ordering that was caught in #81361. As per the lock ordering convention between a parent, and a child span we now notify the parent of StructuredEvents recorded by the child outside of the child span's lock. Additionally, we now notify the event listeners without holding the span's mutex. This is to protect against deadlocks if the `Notify` method were to call methods on the tracing span which acquire the span's mutex. One can imagine `Notify` calling `SetLazyTag` on the same tracing span as the one that has the event listener. Fixes: #81361 Release note: None
- Loading branch information
1 parent
709881d
commit 6a3c0f9
Showing
4 changed files
with
60 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
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