Skip to content
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

metrics: address race in MetricVec collection code path #137532

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

MattWhelan
Copy link
Contributor

The *Vec metrics employ a RWLock to control concurrent access to the set of labels they maintain, but we were reading that set without holding the lock during metric collections.

Fixes: #137396

Release note: None

The *Vec metrics employ a RWLock to control concurrent access to the set
of labels they maintain, but we were reading that set without holding
the lock during metric collections.

Fixes: cockroachdb#137396

Release note: None
@MattWhelan MattWhelan requested review from a team as code owners December 16, 2024 16:52
@MattWhelan MattWhelan requested review from angles-n-daemons, arjunmahishi and aa-joshi and removed request for a team December 16, 2024 16:52
Copy link

blathers-crl bot commented Dec 16, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@MattWhelan MattWhelan requested review from kyle-a-wong and removed request for angles-n-daemons, arjunmahishi and aa-joshi December 16, 2024 16:53
@kyle-a-wong kyle-a-wong added the backport-24.3.x Flags PRs that need to be backported to 24.3 label Dec 16, 2024
Copy link
Contributor

@kyle-a-wong kyle-a-wong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for the fix. I also added the backport label for 24.3 backport

@MattWhelan
Copy link
Contributor Author

bors r=kyle-a-wong

@craig craig bot merged commit c524fdc into cockroachdb:master Dec 16, 2024
22 checks passed
Copy link

blathers-crl bot commented Dec 16, 2024

Based on the specified backports for this PR, I applied new labels to the following linked issue(s). Please adjust the labels as needed to match the branches actually affected by the issue(s), including adding any known older branches.


Issue #137396: branch-release-24.3.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-24.3.x Flags PRs that need to be backported to 24.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

util/metric: data race around histogram labels
3 participants