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.
100667: util/bulk: fix locking order in TracingAggregator r=yuzefovich a=yuzefovich This commit fixes an inconsistent locking order in TracingAggregator that was recently introduced in c120153. In particular, now `EventListener.Notify` is called while holding the span's mutex. However, `TracingAggregator.Close` was implemented in such a fashion that its internal mutex was before `Finish` (which acquires the span's mutex). This commit fixes this issue by getting rid of unnecessary locking in `Close` - namely, it's now required that `Close` is called exactly once, so we can just call `span.Finish`. Fixes: cockroachdb#100562 Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]>
- Loading branch information
Showing
2 changed files
with
9 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