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:
Harshavardhana
2016-06-29 02:10:40 -07:00
committed by Anand Babu (AB) Periasamy
parent d484157d67
commit ae936a0147
9 changed files with 249 additions and 215 deletions

View File

@@ -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