xl/zones: return errNoHealRequired when no heal is required (#8821)

Zone abstraction of object layer was returning `nil`
incorrectly under situations where disk healing is
not required. Returning `nil` is considered as healing
successful, which leads to unexpected ReloadFormat()
peer notification calls during startup.

This PR fixes this behavior properly for zones.
This commit is contained in:
Harshavardhana
2020-01-15 17:19:13 -08:00
committed by GitHub
parent 169e8742fc
commit 64fde1ab95
4 changed files with 19 additions and 8 deletions
-1
View File
@@ -762,7 +762,6 @@ func initFormatXL(ctx context.Context, storageDisks []StorageAPI, setCount, driv
formats := make([]*formatXLV3, len(storageDisks))
wantAtMost := ecDrivesNoConfig(drivesPerSet)
logger.Info("Formatting zone, %v set(s), %v drives per set.", setCount, drivesPerSet)
for i := 0; i < setCount; i++ {
hostCount := make(map[string]int, drivesPerSet)
for j := 0; j < drivesPerSet; j++ {