mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
HealObject should succeed when only N/2 disks have data (#3952)
This commit is contained in:
committed by
Harshavardhana
parent
fbfb4fc5a0
commit
417ec0df56
@@ -225,10 +225,10 @@ func disksWithAllParts(onlineDisks []StorageAPI, partsMetadata []xlMetaV1, errs
|
||||
// disk has a valid xl.json but may not have all the
|
||||
// parts. This is considered an outdated disk, since
|
||||
// it needs healing too.
|
||||
for pIndex, part := range partsMetadata[index].Parts {
|
||||
for _, part := range partsMetadata[index].Parts {
|
||||
// compute blake2b sum of part.
|
||||
partPath := filepath.Join(object, part.Name)
|
||||
hash := newHash(blake2bAlgo)
|
||||
hash := newHash(partsMetadata[index].Erasure.Algorithm)
|
||||
blakeBytes, hErr := hashSum(onlineDisk, bucket, partPath, hash)
|
||||
if hErr == errFileNotFound {
|
||||
errs[index] = errFileNotFound
|
||||
@@ -239,7 +239,7 @@ func disksWithAllParts(onlineDisks []StorageAPI, partsMetadata []xlMetaV1, errs
|
||||
return nil, nil, traceError(hErr)
|
||||
}
|
||||
|
||||
partChecksum := partsMetadata[index].Erasure.Checksum[pIndex].Hash
|
||||
partChecksum := partsMetadata[index].Erasure.GetCheckSumInfo(part.Name).Hash
|
||||
blakeSum := hex.EncodeToString(blakeBytes)
|
||||
// if blake2b sum doesn't match for a part
|
||||
// then this disk is outdated and needs
|
||||
|
||||
Reference in New Issue
Block a user