-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix: data race in seriesIterator, use atomic int #12223
Conversation
…a-race-in-sample-iterator
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
relates to: #8586 |
I suggest this is not the right approach. Making every seriesIterator atomic will have an impact on performance, and is at odds with the concept of an iterator. Iterators are analogous to an index into an array: they should not be accessed from multiple goroutines without some interlock at a higher level. I think the race reported on this test arises because |
…)" This reverts commit 60dcee1. We don't want atomic iterators.
Before the fix
After the fix