XL: isQuorum rename as isDiskQuorum, word it properly. (#2196)

This commit is contained in:
Harshavardhana
2016-07-13 00:29:48 -07:00
committed by Anand Babu (AB) Periasamy
parent 3b69b4ada4
commit dc3bafb194
7 changed files with 28 additions and 25 deletions

View File

@@ -62,7 +62,7 @@ func (xl xlObjects) updateUploadsJSON(bucket, object string, uploadsJSON uploads
wg.Wait()
// Count all the errors and validate if we have write quorum.
if !isQuorum(errs, xl.writeQuorum) {
if !isDiskQuorum(errs, xl.writeQuorum) {
// Rename `uploads.json` left over back to tmp location.
for index, disk := range xl.storageDisks {
if disk == nil {
@@ -149,7 +149,7 @@ func (xl xlObjects) writeUploadJSON(bucket, object, uploadID string, initiated t
wg.Wait()
// Count all the errors and validate if we have write quorum.
if !isQuorum(errs, xl.writeQuorum) {
if !isDiskQuorum(errs, xl.writeQuorum) {
// Rename `uploads.json` left over back to tmp location.
for index, disk := range xl.storageDisks {
if disk == nil {
@@ -295,9 +295,10 @@ func commitXLMetadata(disks []StorageAPI, srcPrefix, dstPrefix string, writeQuor
wg.Wait()
// Do we have write quorum?.
if !isQuorum(mErrs, writeQuorum) {
if !isDiskQuorum(mErrs, writeQuorum) {
return errXLWriteQuorum
}
// For all other errors return.
for _, err := range mErrs {
if err != nil && err != errDiskNotFound {