fix write quorum calculation for bucket operations (#10364)

When the number of disks is odd, the calculation of quorum 
for bucket operations were not correct, fix it.
This commit is contained in:
Anis Elleuch 2020-08-27 20:55:32 +01:00 committed by GitHub
parent 73a6b4ea11
commit 46ee8659b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,7 +105,11 @@ func getReadQuorum(drive int) int {
}
func getWriteQuorum(drive int) int {
return getDefaultDataBlocks(drive) + 1
quorum := getDefaultDataBlocks(drive)
if getDefaultParityBlocks(drive) == quorum {
quorum++
}
return quorum
}
// URI scheme constants.