mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 20:50:22 +03:00
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:
+5
-1
@@ -105,7 +105,11 @@ func getReadQuorum(drive int) int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getWriteQuorum(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.
|
// URI scheme constants.
|
||||||
|
|||||||
Reference in New Issue
Block a user