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

Potential data race, maybe #302

Closed
gaocegege opened this issue Jan 12, 2018 · 6 comments
Closed

Potential data race, maybe #302

gaocegege opened this issue Jan 12, 2018 · 6 comments

Comments

@gaocegege
Copy link
Member

Now we keep a map in the controller: https://github.com/tensorflow/k8s/blob/master/pkg/controller/controller.go#L49 and the controller has several workers, so I think it may have data race since there is no synchronization mechanism.

@jlewi
Copy link
Contributor

jlewi commented Jan 13, 2018

Is this the result of the refactoring to use informer and controller classes?

@gaocegege
Copy link
Member Author

gaocegege commented Jan 14, 2018

I think so. Before the refactor, we do not have a workqueue and these worker goroutines.

@jlewi
Copy link
Contributor

jlewi commented Jan 16, 2018

Doesn't the workqueue ensure that only a single worker is processing a given job?

@gaocegege
Copy link
Member Author

@jlewi Yeah, but the map could be accessed by all workers at one time.

@jlewi jlewi added this to the Kubecon Europe milestone Jan 25, 2018
@gaocegege
Copy link
Member Author

This could be solved after #314

@gaocegege
Copy link
Member Author

Closed by #492

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants