Set disk to nil after write which needs quorum (#3795)

Ignore a disk which wasn't able to successfully perform an action to
avoid eventual perturbations when the disk comes back in the middle
of write change.
This commit is contained in:
Anis Elleuch
2017-02-26 20:58:32 +01:00
committed by Harshavardhana
parent 461b2bbd37
commit dce0345f8f
4 changed files with 11 additions and 0 deletions

View File

@@ -395,6 +395,8 @@ func rename(disks []StorageAPI, srcBucket, srcEntry, dstBucket, dstEntry string,
err := disk.RenameFile(srcBucket, srcEntry, dstBucket, dstEntry)
if err != nil && err != errFileNotFound {
errs[index] = traceError(err)
// Ignore disk which returned an error.
disks[index] = nil
}
}(index, disk)
}