mirror of
https://github.com/minio/minio.git
synced 2025-11-13 07:11:44 -05:00
XL/multipart: statPart should ignore errDiskNotFound. (#1862)
startPart should also take uploadId and partName as arguments.
This commit is contained in:
@@ -363,6 +363,7 @@ func (xl xlObjects) isMultipartUpload(bucket, prefix string) bool {
|
||||
}
|
||||
_, err := disk.StatFile(bucket, pathJoin(prefix, uploadsJSONFile))
|
||||
if err != nil {
|
||||
// For any reason disk was deleted or goes offline, continue
|
||||
if err == errDiskNotFound {
|
||||
continue
|
||||
}
|
||||
@@ -383,6 +384,7 @@ func (xl xlObjects) listUploadsInfo(prefixPath string) (uploadsInfo []uploadInfo
|
||||
var uploadsJSON uploadsV1
|
||||
uploadsJSON, err = readUploadsJSON(splitPrefixes[1], splitPrefixes[2], disk)
|
||||
if err != nil {
|
||||
// For any reason disk was deleted or goes offline, continue
|
||||
if err == errDiskNotFound {
|
||||
continue
|
||||
}
|
||||
@@ -422,3 +424,23 @@ func (xl xlObjects) removeObjectPart(bucket, object, uploadID, partName string)
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
// statPart - returns fileInfo structure for a successful stat on part file.
|
||||
func (xl xlObjects) statPart(bucket, object, uploadID, partName string) (fileInfo FileInfo, err error) {
|
||||
partNamePath := path.Join(mpartMetaPrefix, bucket, object, uploadID, partName)
|
||||
for _, disk := range xl.getLoadBalancedQuorumDisks() {
|
||||
if disk == nil {
|
||||
continue
|
||||
}
|
||||
fileInfo, err = disk.StatFile(minioMetaBucket, partNamePath)
|
||||
if err != nil {
|
||||
// For any reason disk was deleted or goes offline, continue
|
||||
if err == errDiskNotFound {
|
||||
continue
|
||||
}
|
||||
return FileInfo{}, err
|
||||
}
|
||||
break
|
||||
}
|
||||
return fileInfo, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user