FS/Multipart: remove uploads.json on complete-multipart if no more uploadIDs are present for the object. (#1843)

Fixes #1835
This commit is contained in:
Krishna Srinivas
2016-06-03 04:24:00 +05:30
committed by Harshavardhana
parent 611c892f8f
commit aa1d769b1e
2 changed files with 30 additions and 1 deletions

View File

@@ -639,7 +639,7 @@ func (xl xlObjects) CompleteMultipartUpload(bucket string, object string, upload
// Delete the previously successfully renamed object.
xl.deleteObject(minioMetaBucket, path.Join(tmpMetaPrefix, uniqueID))
// Hold the lock so that two parallel complete-multipart-uploads do no
// Hold the lock so that two parallel complete-multipart-uploads do not
// leave a stale uploads.json behind.
nsMutex.Lock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, object))
defer nsMutex.Unlock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, object))