mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
XL: Relax write quorum further to N/2 + 1. (#2018)
This changes behavior in some parts of the code as well address it. Fixes #2016
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
d484157d67
commit
ae936a0147
11
xl-v1.go
11
xl-v1.go
@@ -171,16 +171,9 @@ func newXLObjects(disks []string) (ObjectLayer, error) {
|
||||
}
|
||||
|
||||
// Figure out read and write quorum based on number of storage disks.
|
||||
// Read quorum should be always N/2 + 1 (due to Vandermonde matrix
|
||||
// erasure requirements)
|
||||
// READ and WRITE quorum is always set to (N/2 + 1) number of disks.
|
||||
xl.readQuorum = len(xl.storageDisks)/2 + 1
|
||||
|
||||
// Write quorum is assumed if we have total disks + 2
|
||||
// parity.
|
||||
xl.writeQuorum = len(xl.storageDisks)/2 + 2
|
||||
if xl.writeQuorum > len(xl.storageDisks) {
|
||||
xl.writeQuorum = len(xl.storageDisks)
|
||||
}
|
||||
xl.writeQuorum = len(xl.storageDisks)/2 + 1
|
||||
|
||||
// Return successfully initialized object layer.
|
||||
return xl, nil
|
||||
|
||||
Reference in New Issue
Block a user