xl: GetCheckSumInfo() shouldn't fail if hash not available. (#2984)

In a multipart upload scenario disks going down and coming backup
can lead to certain parts missing on the disk/server which was
going down. This is a valid case since these blocks can be
missing and should be healed through heal operation. But we are
not supposed to fail prematurely since we have enough data on
the other disks as well within read-quorum.

This fix relaxes previous assumption, fixes a major corruption
issue reproduced by @vadmeste.

Fixes #2976
This commit is contained in:
Harshavardhana
2016-10-18 11:13:25 -07:00
committed by GitHub
parent 6e748cb1cf
commit 39331b6b4e
5 changed files with 12 additions and 16 deletions

View File

@@ -171,10 +171,7 @@ func (xl xlObjects) HealObject(bucket, object string) error {
partName := latestMeta.Parts[partIndex].Name
partSize := latestMeta.Parts[partIndex].Size
erasure := latestMeta.Erasure
sumInfo, err := latestMeta.Erasure.GetCheckSumInfo(partName)
if err != nil {
return err
}
sumInfo := latestMeta.Erasure.GetCheckSumInfo(partName)
// Heal the part file.
checkSums, err := erasureHealFile(latestDisks, outDatedDisks,
bucket, pathJoin(object, partName),