Skip to content

Commit 5c02688

Browse files
committed
converter: use OpenWriter helper function
When several goroutines call uncompress converter in parallel, the ref name conflicts each other. This leads to Writer method failing with Unavaliable error without retry. For solving this issue, OpenWriter helper should be used. This allows them to retry in such situations. Signed-off-by: Kohei Tokunaga <[email protected]>
1 parent 4f18131 commit 5c02688

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

images/converter/uncompress/uncompress.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func LayerConvertFunc(ctx context.Context, cs content.Store, desc ocispec.Descri
5555
}
5656
defer newR.Close()
5757
ref := fmt.Sprintf("convert-uncompress-from-%s", desc.Digest)
58-
w, err := cs.Writer(ctx, content.WithRef(ref))
58+
w, err := content.OpenWriter(ctx, cs, content.WithRef(ref))
5959
if err != nil {
6060
return nil, err
6161
}

0 commit comments

Comments
 (0)