|
|
@ -62,8 +62,7 @@ func (xl xlObjects) listMultipartUploads(bucket, prefix, keyMarker, uploadIDMark |
|
|
|
// List all upload ids for the keyMarker starting from
|
|
|
|
// List all upload ids for the keyMarker starting from
|
|
|
|
// uploadIDMarker first.
|
|
|
|
// uploadIDMarker first.
|
|
|
|
if uploadIDMarker != "" { |
|
|
|
if uploadIDMarker != "" { |
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID := getOpsID() |
|
|
|
opsID := getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
nsMutex.RLock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, keyMarker), opsID) |
|
|
|
nsMutex.RLock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, keyMarker), opsID) |
|
|
@ -132,8 +131,7 @@ func (xl xlObjects) listMultipartUploads(bucket, prefix, keyMarker, uploadIDMark |
|
|
|
var end bool |
|
|
|
var end bool |
|
|
|
uploadIDMarker = "" |
|
|
|
uploadIDMarker = "" |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID := getOpsID() |
|
|
|
opsID := getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
// For the new object entry we get all its pending uploadIDs.
|
|
|
|
// For the new object entry we get all its pending uploadIDs.
|
|
|
@ -278,8 +276,7 @@ func (xl xlObjects) newMultipartUpload(bucket string, object string, meta map[st |
|
|
|
xlMeta.Stat.ModTime = time.Now().UTC() |
|
|
|
xlMeta.Stat.ModTime = time.Now().UTC() |
|
|
|
xlMeta.Meta = meta |
|
|
|
xlMeta.Meta = meta |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID := getOpsID() |
|
|
|
opsID := getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
// This lock needs to be held for any changes to the directory contents of ".minio.sys/multipart/object/"
|
|
|
|
// This lock needs to be held for any changes to the directory contents of ".minio.sys/multipart/object/"
|
|
|
@ -353,8 +350,7 @@ func (xl xlObjects) PutObjectPart(bucket, object, uploadID string, partID int, s |
|
|
|
var errs []error |
|
|
|
var errs []error |
|
|
|
uploadIDPath := pathJoin(mpartMetaPrefix, bucket, object, uploadID) |
|
|
|
uploadIDPath := pathJoin(mpartMetaPrefix, bucket, object, uploadID) |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID := getOpsID() |
|
|
|
opsID := getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
nsMutex.RLock(minioMetaBucket, uploadIDPath, opsID) |
|
|
|
nsMutex.RLock(minioMetaBucket, uploadIDPath, opsID) |
|
|
@ -439,8 +435,7 @@ func (xl xlObjects) PutObjectPart(bucket, object, uploadID string, partID int, s |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID = getOpsID() |
|
|
|
opsID = getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
nsMutex.Lock(minioMetaBucket, uploadIDPath, opsID) |
|
|
|
nsMutex.Lock(minioMetaBucket, uploadIDPath, opsID) |
|
|
@ -588,8 +583,7 @@ func (xl xlObjects) ListObjectParts(bucket, object, uploadID string, partNumberM |
|
|
|
return ListPartsInfo{}, traceError(ObjectNameInvalid{Bucket: bucket, Object: object}) |
|
|
|
return ListPartsInfo{}, traceError(ObjectNameInvalid{Bucket: bucket, Object: object}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID := getOpsID() |
|
|
|
opsID := getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
// Hold lock so that there is no competing abort-multipart-upload or complete-multipart-upload.
|
|
|
|
// Hold lock so that there is no competing abort-multipart-upload or complete-multipart-upload.
|
|
|
@ -625,8 +619,7 @@ func (xl xlObjects) CompleteMultipartUpload(bucket string, object string, upload |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID := getOpsID() |
|
|
|
opsID := getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
// Hold lock so that
|
|
|
|
// Hold lock so that
|
|
|
@ -745,8 +738,7 @@ func (xl xlObjects) CompleteMultipartUpload(bucket string, object string, upload |
|
|
|
return "", toObjectErr(rErr, minioMetaBucket, uploadIDPath) |
|
|
|
return "", toObjectErr(rErr, minioMetaBucket, uploadIDPath) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID = getOpsID() |
|
|
|
opsID = getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
// Hold write lock on the destination before rename.
|
|
|
|
// Hold write lock on the destination before rename.
|
|
|
@ -798,8 +790,7 @@ func (xl xlObjects) CompleteMultipartUpload(bucket string, object string, upload |
|
|
|
// Delete the previously successfully renamed object.
|
|
|
|
// Delete the previously successfully renamed object.
|
|
|
|
xl.deleteObject(minioMetaBucket, path.Join(tmpMetaPrefix, uniqueID)) |
|
|
|
xl.deleteObject(minioMetaBucket, path.Join(tmpMetaPrefix, uniqueID)) |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID = getOpsID() |
|
|
|
opsID = getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
// Hold the lock so that two parallel complete-multipart-uploads do not
|
|
|
|
// Hold the lock so that two parallel complete-multipart-uploads do not
|
|
|
@ -845,8 +836,7 @@ func (xl xlObjects) abortMultipartUpload(bucket, object, uploadID string) (err e |
|
|
|
return toObjectErr(err, bucket, object) |
|
|
|
return toObjectErr(err, bucket, object) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID := getOpsID() |
|
|
|
opsID := getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
nsMutex.Lock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, object), opsID) |
|
|
|
nsMutex.Lock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, object), opsID) |
|
|
@ -902,8 +892,7 @@ func (xl xlObjects) AbortMultipartUpload(bucket, object, uploadID string) error |
|
|
|
return traceError(ObjectNameInvalid{Bucket: bucket, Object: object}) |
|
|
|
return traceError(ObjectNameInvalid{Bucket: bucket, Object: object}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// generates random string on setting MINIO_DEBUG=lock, else returns empty string.
|
|
|
|
// get a random ID for lock instrumentation.
|
|
|
|
// used for instrumentation on locks.
|
|
|
|
|
|
|
|
opsID := getOpsID() |
|
|
|
opsID := getOpsID() |
|
|
|
|
|
|
|
|
|
|
|
// Hold lock so that there is no competing complete-multipart-upload or put-object-part.
|
|
|
|
// Hold lock so that there is no competing complete-multipart-upload or put-object-part.
|
|
|
|