update quorum requirement to list all objects (#14201)

some upgraded objects might not get listed due
to different quorum ratios across objects.

make sure to list all objects that satisfy the
maximum possible quorum.
This commit is contained in:
Harshavardhana
2022-01-27 17:00:15 -08:00
committed by GitHub
parent c3d9c45f58
commit aaea94a48d
4 changed files with 9 additions and 15 deletions

View File

@@ -289,7 +289,7 @@ func scanDataFolder(ctx context.Context, poolIdx, setIdx int, basePath string, c
if poolIdx < len(objAPI.serverPools) && setIdx < len(objAPI.serverPools[poolIdx].sets) {
// Pass the disks belonging to the set.
s.disks = objAPI.serverPools[poolIdx].sets[setIdx].getDisks()
s.disksQuorum = objAPI.serverPools[poolIdx].sets[setIdx].defaultRQuorum()
s.disksQuorum = len(s.disks) / 2
} else {
logger.LogIf(ctx, fmt.Errorf("Matching pool %s, set %s not found", humanize.Ordinal(poolIdx+1), humanize.Ordinal(setIdx+1)))
}