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

Read locks and data race fixes #2445

Merged
merged 13 commits into from
Apr 28, 2015
Merged

Read locks and data race fixes #2445

merged 13 commits into from
Apr 28, 2015

Conversation

jwilder
Copy link
Contributor

@jwilder jwilder commented Apr 28, 2015

This PR replaces many write locks with read locks where possible. It also fixes two data races.

Fixes #2401

@toddboom
Copy link
Contributor

+1

lots of good stuff here! 💃

@@ -90,7 +90,9 @@ func (s *Stats) Walk(f func(string, int64)) {
defer s.mu.RUnlock()

for k, v := range s.m {
v.mu.RLock()
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, so here is the race, nice.

@otoolep
Copy link
Contributor

otoolep commented Apr 28, 2015

+1

jwilder added a commit that referenced this pull request Apr 28, 2015
Read locks and data race fixes
@jwilder jwilder merged commit b086598 into master Apr 28, 2015
@jwilder jwilder deleted the jw-locks branch April 28, 2015 14:32
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.

Data race in shard stats
3 participants