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

Kubelet: simplify the lock acquring pattern #5605

Merged
merged 1 commit into from
Mar 18, 2015

Conversation

yujuhong
Copy link
Contributor

Avoid holding both podStatusesLock and podLock at the same time.

Avoid holding both podStatusesLock and podLock at the same time.
@yujuhong
Copy link
Contributor Author

cc/ @vmarmol, @fgrzadkowski

@vmarmol vmarmol self-assigned this Mar 18, 2015
@vmarmol
Copy link
Contributor

vmarmol commented Mar 18, 2015

LGTM, thanks @yujuhong!

You had mentioned before of trying to merge pod and podStatus into a separate thread-safe object, do you think that's still worthwhile?

vmarmol added a commit that referenced this pull request Mar 18, 2015
Kubelet: simplify the lock acquring pattern
@vmarmol vmarmol merged commit 1e5eec6 into kubernetes:master Mar 18, 2015
@yujuhong
Copy link
Contributor Author

I think it'd help with code clarity, and it'll prevent people from misusing the objects. If you agree with it, I can file an issue and work on it :)

@vmarmol
Copy link
Contributor

vmarmol commented Mar 18, 2015

+1! The deadlock from before shows how easy the misuse is. Feel free to work on it if you have time :)

@yujuhong yujuhong deleted the kubelet_locks branch March 23, 2015 18:58
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.

3 participants