XL: Bring in support for object versions written during writeQuorum. (#1762)

Erasure is initialized as needed depending on the quorum and onlineDisks.
This way we can manage the quorum at the object layer.
This commit is contained in:
Harshavardhana
2016-05-25 16:42:31 -07:00
committed by Harshavardhana
parent cae4782973
commit 553fdb9211
9 changed files with 353 additions and 115 deletions
+3 -5
View File
@@ -34,7 +34,7 @@ type erasure struct {
var errUnexpected = errors.New("Unexpected error - please report at https://github.com/minio/minio/issues")
// newErasure instantiate a new erasure.
func newErasure(disks []StorageAPI) (*erasure, error) {
func newErasure(disks []StorageAPI) *erasure {
// Initialize E.
e := &erasure{}
@@ -43,9 +43,7 @@ func newErasure(disks []StorageAPI) (*erasure, error) {
// Initialize reed solomon encoding.
rs, err := reedsolomon.New(dataBlocks, parityBlocks)
if err != nil {
return nil, err
}
fatalIf(err, "Unable to initialize reedsolomon package.")
// Save the reedsolomon.
e.DataBlocks = dataBlocks
@@ -56,5 +54,5 @@ func newErasure(disks []StorageAPI) (*erasure, error) {
e.storageDisks = disks
// Return successfully initialized.
return e, nil
return e
}