forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracing: Notify EventListeners while holding the span's mutex
This commit addresses an oversight that was introduced in 6a3c0f9 where we made the notifications of the EventListeners done without holding the span's mutex. However, the contract of `WithEventListeners` implies that the callbacks are not called any more after `Finish()` returns, so that commit introduced a bug that is now fixed in this commit. The fix done in this commit is suboptimal though - it introduces an exported method `SetLazyTagLocked` which is not great. The proper fix would be to refactor `TracingAggregator` to avoid setting the lazy tag dynamically, in the event listener callback, but that seems like a non-trivial change, and I'd like to get this commit backported. To avoid introducing more callsites of this `SetLazyTagLocked` method it is marked as "deprecated" and cockroachdb#100438 tracks addressing this piece of the tech debt. Release note: None
- Loading branch information
1 parent
5a940f6
commit c120153
Showing
8 changed files
with
33 additions
and
36 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
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