fix: strict quorum in list should list on all drives (#11157)

current implementation was incorrect, it in-fact
assumed only read quorum number of disks. in-fact
that value is only meant for read quorum good entries
from all online disks.

This PR fixes this behavior properly.
This commit is contained in:
Harshavardhana
2020-12-23 09:26:40 -08:00
committed by GitHub
parent 5982965839
commit 6a66f142d4
2 changed files with 4 additions and 11 deletions

View File

@@ -113,8 +113,6 @@ func (sCfg *Config) UnmarshalJSON(data []byte) error {
// acceptable quorum expected for list operations
func (sCfg Config) GetListQuorum() int {
switch sCfg.ListQuorum {
case "optimal":
return 3
case "reduced":
return 2
case "disk":
@@ -123,7 +121,7 @@ func (sCfg Config) GetListQuorum() int {
case "strict":
return -1
}
// Defaults to 3 drives per set.
// Defaults to 3 drives per set, defaults to "optimal" value
return 3
}