Skip to content

cache: avoid concurrent maps write on prune - #2177

Merged
tonistiigi merged 1 commit into
moby:masterfrom
tonistiigi:fix-prune-lock
Jun 15, 2021
Merged

cache: avoid concurrent maps write on prune#2177
tonistiigi merged 1 commit into
moby:masterfrom
tonistiigi:fix-prune-lock

Conversation

@tonistiigi

Copy link
Copy Markdown
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

bra-fsn commented Sep 15, 2021

Copy link
Copy Markdown

@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