mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
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.
This commit is contained in:
parent
e1ae90c12b
commit
d3553f8dfc
@ -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…
Reference in New Issue
Block a user