-
Notifications
You must be signed in to change notification settings - Fork 840
Replace usage of sync/atomic with uber-go/atomic #2951
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
Conversation
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
Signed-off-by: Javier Palomo <[email protected]>
23541c5 to
8ea70fb
Compare
|
@pracucci would you mind reviewing this PR? |
|
Thanks for doing this! Would you mind looking at https://github.com/grafana/loki repository as well? Some of the code there is copied from Cortex. |
pracucci
left a comment
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.
Fantastic job, well done, thanks! ❤️ 👏
@pstibrany Could you review this PR too, so we can get this merged?
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. Thanks a lot!
There are some places where we should remove pointers to atomic types, and use them directly:
- pkg/ingester/ingester_v2.go:57
- pkg/querier/frontend/frontend.go:70
- pkg/querier/frontend/worker_frontend_manager.go:37
- pkg/ring/lifecycler.go:125
- pkg/ring/kv/multi.go:92
- pkg/ring/kv/multi.go:98
Do you think we can get it done as part of this PR?
|
Hey @pstibrany, I would rather have this merged as it is and send those additional changes in a subsequent PR if that is okay with you. |
Sounds good to me. |
|
Thanks for your PR and looking forward to the next one ;-) |
What this PR does: Replaces all direct usages of
sync/atomicwithgo.uber.org/atomic. That way we ensure that all access to variables that have atomic access is in fact always atomic.Which issue(s) this PR fixes:
Fixes #2923
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]