mirror of
https://github.com/minio/minio.git
synced 2025-04-23 11:55:47 -04:00
odd stripe sizes should choose (odd+1)/2 to get correct quorum (#14610)
This commit is contained in:
parent
50577e2bd2
commit
8eecdc6d1f
@ -547,8 +547,8 @@ func (er *erasureObjects) listPath(ctx context.Context, o listPathOptions, resul
|
|||||||
|
|
||||||
// Special case: ask all disks if the drive count is 4
|
// Special case: ask all disks if the drive count is 4
|
||||||
if askDisks <= 0 || er.setDriveCount == 4 {
|
if askDisks <= 0 || er.setDriveCount == 4 {
|
||||||
askDisks = len(disks) // with 'strict' quorum list on all online disks.
|
askDisks = len(disks) // with 'strict' quorum list on all online disks.
|
||||||
listingQuorum = len(disks) / 2 // keep this such that we can list all objects with different quorum ratio.
|
listingQuorum = (len(disks) + 1) / 2 // keep this such that we can list all objects with different quorum ratio.
|
||||||
}
|
}
|
||||||
if askDisks > 0 && len(disks) > askDisks {
|
if askDisks > 0 && len(disks) > askDisks {
|
||||||
rand.Shuffle(len(disks), func(i, j int) {
|
rand.Shuffle(len(disks), func(i, j int) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user