-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add a mutex lock to 'awsCloudInstances' map #15415
Add a mutex lock to 'awsCloudInstances' map #15415
Conversation
Welcome @fcgravalos! |
Hi @fcgravalos. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
66c9896
to
609ab46
Compare
@rifelpet would you mind re-triggering tests again? Thanks! |
/ok-to-test |
We're using terraform kops provider to manage our AWS kops clusters. Time to time we hit a race condition with the stack trace points to `awsup.NewAWSCloud` function, when writing to a concurrent map, that maintains a map between regions and `AWSCloud` objects. This PR changes this to variable so it belongs to a new type, that wraps the map into its own struct where access is controlled by a mutex lock. Let me know if that makes sense to you all. Thanks for building this awesome project!
609ab46
to
3e03eea
Compare
@hakman made another change to make sure concurrent access to the |
All the ci checks passed! 🚀 |
I think mutexes need to be used both in write and read places, not just write. |
@hakman added locking on reads too |
Thanks @fcgravalos /label tide/merge-method-squash /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justinsb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Add a mutex lock to 'awsCloudInstances' map We're using terraform kops provider to manage our AWS kops clusters. Time to time we hit a race condition with the stack trace points to `awsup.NewAWSCloud` function, when writing to a concurrent map, that maintains a map between regions and `AWSCloud` objects. This PR changes this to variable so it belongs to a new type, that wraps the map into its own struct where access is controlled by a mutex lock. Let me know if that makes sense to you all. Thanks for building this awesome project! * lock on reads as well * cosmetic change, removing empty line
* Add a mutex lock to 'awsCloudInstances' map We're using terraform kops provider to manage our AWS kops clusters. Time to time we hit a race condition with the stack trace points to `awsup.NewAWSCloud` function, when writing to a concurrent map, that maintains a map between regions and `AWSCloud` objects. This PR changes this to variable so it belongs to a new type, that wraps the map into its own struct where access is controlled by a mutex lock. Let me know if that makes sense to you all. Thanks for building this awesome project! * lock on reads as well * cosmetic change, removing empty line
We're using terraform kops provider to manage our AWS kops clusters. Time to time we hit a race condition which the stack trace points to
awsup.NewAWSCloud
function, when writing to a map that holds the relationship regions toAWSCloud
objects.This PR changes this map to a new variable so it belongs to a new type, that wraps the map into its own struct where access is controlled by a mutex lock.
Let me know if that makes sense to you all.
Thanks for building this awesome project!