From 6f73d597e0cb53b80b2afd4cf8c47ac9a31b77b2 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Thu, 15 Sep 2016 05:24:54 +0100 Subject: [PATCH] Fix tracing twice an error in fs Complete Multipart Upload (#2703) --- cmd/fs-v1-multipart.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/fs-v1-multipart.go b/cmd/fs-v1-multipart.go index 37d9965fb..f0a1370ea 100644 --- a/cmd/fs-v1-multipart.go +++ b/cmd/fs-v1-multipart.go @@ -644,14 +644,14 @@ func (fs fsObjects) CompleteMultipartUpload(bucket string, object string, upload // Calculate s3 compatible md5sum for complete multipart. s3MD5, err := completeMultipartMD5(parts...) if err != nil { - return "", traceError(err) + return "", err } // Read saved fs metadata for ongoing multipart. fsMetaPath := pathJoin(uploadIDPath, fsMetaJSONFile) fsMeta, err := readFSMetadata(fs.storage, minioMetaBucket, fsMetaPath) if err != nil { - return "", toObjectErr(traceError(err), minioMetaBucket, fsMetaPath) + return "", toObjectErr(err, minioMetaBucket, fsMetaPath) } fsAppendMeta, err := readFSMetadata(fs.storage, minioMetaBucket, fsAppendMetaPath) @@ -745,7 +745,7 @@ func (fs fsObjects) CompleteMultipartUpload(bucket string, object string, upload // Cleanup all the parts if everything else has been safely committed. if err = cleanupUploadedParts(bucket, object, uploadID, fs.storage); err != nil { - return "", toObjectErr(traceError(err), bucket, object) + return "", toObjectErr(err, bucket, object) } // generates random string on setting MINIO_DEBUG=lock, else returns empty string. @@ -761,7 +761,7 @@ func (fs fsObjects) CompleteMultipartUpload(bucket string, object string, upload // the object, if yes do not attempt to delete 'uploads.json'. uploadsJSON, err := readUploadsJSON(bucket, object, fs.storage) if err != nil { - return "", toObjectErr(traceError(err), minioMetaBucket, object) + return "", toObjectErr(err, minioMetaBucket, object) } // If we have successfully read `uploads.json`, then we proceed to // purge or update `uploads.json`. @@ -771,7 +771,7 @@ func (fs fsObjects) CompleteMultipartUpload(bucket string, object string, upload } if len(uploadsJSON.Uploads) > 0 { if err = fs.updateUploadsJSON(bucket, object, uploadsJSON); err != nil { - return "", toObjectErr(traceError(err), minioMetaBucket, path.Join(mpartMetaPrefix, bucket, object)) + return "", toObjectErr(err, minioMetaBucket, path.Join(mpartMetaPrefix, bucket, object)) } // Return success. return s3MD5, nil