Bucket Heal: Do not add empty endpoint entry (#7172)

Currently during a heal of a bucket, if one disk is offline an empty endpoint entry is added.
Then another entry with the missing endpoint is also added.

This results in more entries than disks being added.

Code that adds empty endpoint has been removed.
master
kannappanr 6 years ago committed by GitHub
parent e1ae90c12b
commit d3553f8dfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      cmd/xl-v1-healing.go

@ -133,19 +133,7 @@ func healBucket(ctx context.Context, storageDisks []StorageAPI, bucket string, w
DiskCount: len(storageDisks),
}
for i, before := range beforeState {
if storageDisks[i] == nil {
res.Before.Drives = append(res.Before.Drives, madmin.HealDriveInfo{
UUID: "",
Endpoint: "",
State: before,
})
res.After.Drives = append(res.After.Drives, madmin.HealDriveInfo{
UUID: "",
Endpoint: "",
State: afterState[i],
})
continue
}
if storageDisks[i] != nil {
drive := storageDisks[i].String()
res.Before.Drives = append(res.Before.Drives, madmin.HealDriveInfo{
UUID: "",
@ -158,6 +146,7 @@ func healBucket(ctx context.Context, storageDisks []StorageAPI, bucket string, w
State: afterState[i],
})
}
}
reducedErr := reduceWriteQuorumErrs(ctx, dErrs, bucketOpIgnoredErrs, writeQuorum)
if reducedErr == errXLWriteQuorum {

Loading…
Cancel
Save