You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
imagetools: fix concurrent map write from containerd issue
Workaround for containerd issue that can cause concurrent map
write when WithMediaTypeKeyPrefix is called in parallel
goroutines for context that originated from same base context.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
sub.Log(1, fmt.Appendf(nil, "copying %s from %s to %s\n", desc.Digest.String(), desc.Source.Ref.String(), t.String()))
215
212
returnr.Copy(ctx, desc.Source, t)
216
213
})
217
214
}
218
215
iferr:=eg2.Wait(); err!=nil {
219
216
returnerr
220
217
}
218
+
ctx=withMediaTypeKeyPrefix(ctx) // because of containerd bug this needs to be called separately for each ctx/goroutine pair to avoid concurrent map write
221
219
sub.Log(1, fmt.Appendf(nil, "pushing %s to %s\n", desc.Digest.String(), t.String()))
0 commit comments