-
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.
101949: metric: fix race in manual histogram r=andrewbaptist a=kvoli It was possible for concurrent `Update` and `ToPrometheusMetric` calls to race due to a read lock not being held when calling `ToPrometheusMetric`. This patch adds such a lock and updates the structure to conform to the regular convention of a `mu` struct field, which indicates fields requiring a lock. ``` dev test pkg/kv/kvserver -f TestTenantRateLimiter -v --stress --race ... 288 runs so far, 0 failures, over 14m15s ``` Fixes: #101901 Release note: None Co-authored-by: Austen McClernon <[email protected]>
- Loading branch information
Showing
1 changed file
with
48 additions
and
37 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