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

Don’t hold container lock for size calculation #31159

Merged
merged 1 commit into from Feb 19, 2017

Conversation

tonistiigi
Copy link
Member

fixes #31158

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Copy link
Contributor

@LK4D4 LK4D4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯

@vdemeester vdemeester merged commit 91cffdb into moby:master Feb 19, 2017
@GordonTheTurtle GordonTheTurtle added this to the 17.04.0 milestone Feb 19, 2017
@trapier
Copy link
Contributor

trapier commented Feb 19, 2017

Am somewhat the opposite of an expert in these matters, but what are the chances of failure to stop or remove containers due to "device is busy" due to a size determination in progress? Am thinking along the lines of the note about statfs and fstatfs here https://docs.docker.com/engine/admin/troubleshooting_volume_errors/.

@tonistiigi
Copy link
Member Author

@trapier Layerstore has an internal reference counter for every layer. So when container is deleted in https://github.com/docker/docker/blob/91cffdbedb89e6164fe2ceca3d68ec039c1acc34/daemon/delete.go#L131 that function wouldn't actually delete the layer but only lower the reference count. When the size calculation completes and last reference is released the data is actually cleaned up.

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

Successfully merging this pull request may close these issues.

system df and ps --size block all other ps requests
5 participants