mirror of https://github.com/minio/minio.git
XL/Multipart: During list-multipart-uploads ignore errFileNotFound and errDiskNotFound errors. (#1813)
Fixes #1795
This commit is contained in:
parent
1947ae198e
commit
22511dc4c7
|
@ -401,7 +401,10 @@ func (xl xlObjects) listMultipartUploads(bucket, prefix, keyMarker, uploadIDMark
|
||||||
var err error
|
var err error
|
||||||
var eof bool
|
var eof bool
|
||||||
if uploadIDMarker != "" {
|
if uploadIDMarker != "" {
|
||||||
|
nsMutex.RLock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, keyMarker))
|
||||||
uploads, _, err = listMultipartUploadIDs(bucket, keyMarker, uploadIDMarker, maxUploads, xl.getRandomDisk())
|
uploads, _, err = listMultipartUploadIDs(bucket, keyMarker, uploadIDMarker, maxUploads, xl.getRandomDisk())
|
||||||
|
nsMutex.RUnlock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, keyMarker))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ListMultipartsInfo{}, err
|
return ListMultipartsInfo{}, err
|
||||||
}
|
}
|
||||||
|
@ -423,8 +426,7 @@ func (xl xlObjects) listMultipartUploads(bucket, prefix, keyMarker, uploadIDMark
|
||||||
if walkResult.err != nil {
|
if walkResult.err != nil {
|
||||||
// File not found or Disk not found is a valid case.
|
// File not found or Disk not found is a valid case.
|
||||||
if walkResult.err == errFileNotFound || walkResult.err == errDiskNotFound {
|
if walkResult.err == errFileNotFound || walkResult.err == errDiskNotFound {
|
||||||
eof = true
|
continue
|
||||||
break
|
|
||||||
}
|
}
|
||||||
return ListMultipartsInfo{}, err
|
return ListMultipartsInfo{}, err
|
||||||
}
|
}
|
||||||
|
@ -445,8 +447,13 @@ func (xl xlObjects) listMultipartUploads(bucket, prefix, keyMarker, uploadIDMark
|
||||||
var newUploads []uploadMetadata
|
var newUploads []uploadMetadata
|
||||||
var end bool
|
var end bool
|
||||||
uploadIDMarker = ""
|
uploadIDMarker = ""
|
||||||
|
nsMutex.RLock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, entry))
|
||||||
newUploads, end, err = listMultipartUploadIDs(bucket, entry, uploadIDMarker, maxUploads, xl.getRandomDisk())
|
newUploads, end, err = listMultipartUploadIDs(bucket, entry, uploadIDMarker, maxUploads, xl.getRandomDisk())
|
||||||
|
nsMutex.RUnlock(minioMetaBucket, pathJoin(mpartMetaPrefix, bucket, entry))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err == errFileNotFound || walkResult.err == errDiskNotFound {
|
||||||
|
continue
|
||||||
|
}
|
||||||
return ListMultipartsInfo{}, err
|
return ListMultipartsInfo{}, err
|
||||||
}
|
}
|
||||||
uploads = append(uploads, newUploads...)
|
uploads = append(uploads, newUploads...)
|
||||||
|
|
Loading…
Reference in New Issue