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

cache: avoid concurrent maps write on prune #2177

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

tonistiigi
Copy link
Member

fix #2157
fix #2061

remove() needs to be called while holding the manager lock (even documented). Afaics the reason prune releases manager lock early is to avoid holding it for the potentially slow size calculation. This PR moves size calculation to a separate step to avoid that.

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

remove() needs to be called while holding the manager lock

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi merged commit b9d5a8f into moby:master Jun 15, 2021
@bra-fsn
Copy link

bra-fsn commented Sep 15, 2021

@tonistiigi can this be related as well?
docker/for-linux#1294

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.

concurrent map writes to cm.records concurrent map writes to cm.records
3 participants