de-couple cache completeMultipartUpload with caller context (#14181)

This commit is contained in:
yfanswer 2022-01-27 03:55:58 +08:00 committed by GitHub
parent c8691db2b7
commit f4e373e0d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1153,7 +1153,7 @@ func (c *cacheObjects) CompleteMultipartUpload(ctx context.Context, bucket, obje
if err == nil {
// fill cache in the background
go func() {
_, err := dcache.CompleteMultipartUpload(ctx, bucket, object, uploadID, uploadedParts, oi, opts)
_, err := dcache.CompleteMultipartUpload(bgContext(ctx), bucket, object, uploadID, uploadedParts, oi, opts)
if err != nil {
// fill cache in the background
bReader, bErr := c.InnerGetObjectNInfoFn(GlobalContext, bucket, object, nil, http.Header{}, readLock, ObjectOptions{})