-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
kvserver: remove data race in onSpanConfigUpdate #75021
Conversation
@irfansharif did some prep work for when your day begins. Mind taking this over from me? It will close a lot of issues, I think :-) |
pkg/kv/kvserver/store.go
Outdated
// mutex for longer than necessary. | ||
var repls []*Replica | ||
{ | ||
s.mu.Lock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RLock
We weren't holding `Store.mu`. This fixes boatloads of nightly issues that I am not going to list here, but which should be linked against this PR when it merges. Release note: None
6098cf6
to
86399fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
bors r=aliher1911 |
Build failed: |
We're going with #74926 instead, with also fixes the bug but avoids introducing a new data race 🙈 |
We weren't holding
Store.mu
.Fixes: XXX [repeated 100 times]
Release note: None