fix: heal object shards with ec.index and ec.distribution mismatches (#10773)

Co-authored-by: Harshavardhana <harsha@minio.io>
This commit is contained in:
Krishna Srinivas
2020-10-28 00:10:20 -07:00
committed by GitHub
parent 5b30bbda92
commit f53c5a020e
2 changed files with 31 additions and 11 deletions
-11
View File
@@ -221,17 +221,6 @@ func (er erasureObjects) healObject(ctx context.Context, bucket string, object s
partsMetadata []FileInfo, errs []error, latestFileInfo FileInfo,
dryRun bool, remove bool, scanMode madmin.HealScanMode) (result madmin.HealResultItem, err error) {
for i, metadata := range shufflePartsMetadata(partsMetadata, latestFileInfo.Erasure.Distribution) {
if !metadata.IsValid() {
continue
}
if i != metadata.Erasure.Index-1 {
// FIXME: fix in the next release for objects which erasure.Index does not match
// with expected distribution.
return result, fmt.Errorf("Unable to heal object %s, disk ordering issue detected", pathJoin(bucket, object))
}
}
dataBlocks := latestFileInfo.Erasure.DataBlocks
storageDisks := er.getDisks()