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

kvserver: remove data race in onSpanConfigUpdate #75021

Closed
wants to merge 1 commit into from

Conversation

tbg
Copy link
Member

@tbg tbg commented Jan 18, 2022

We weren't holding Store.mu.

Fixes: XXX [repeated 100 times]

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@tbg tbg marked this pull request as ready for review January 18, 2022 08:27
@tbg tbg requested a review from a team as a code owner January 18, 2022 08:27
@tbg
Copy link
Member Author

tbg commented Jan 18, 2022

@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 :-)

// mutex for longer than necessary.
var repls []*Replica
{
s.mu.Lock()
Copy link
Member Author

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
Copy link
Contributor

@aliher1911 aliher1911 left a comment

Choose a reason for hiding this comment

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

lgtm

@tbg
Copy link
Member Author

tbg commented Jan 18, 2022

bors r=aliher1911
TFTR!

@craig
Copy link
Contributor

craig bot commented Jan 18, 2022

Build failed:

@tbg
Copy link
Member Author

tbg commented Jan 18, 2022

We're going with #74926 instead, with also fixes the bug but avoids introducing a new data race 🙈

@tbg tbg closed this Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants