mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
XL: Implement strided erasure distribution. (#1772)
Strided erasure distribution uses a new randomized block distribution for each Put operation. This information is captured inside `xl.json` for subsequent Get operations.
This commit is contained in:
committed by
Harshavardhana
parent
6dc8323684
commit
d65101a8c8
@@ -136,11 +136,14 @@ func (xl xlObjects) putObjectPartCommon(bucket string, object string, uploadID s
|
||||
if err != nil {
|
||||
return "", toObjectErr(err, bucket, object)
|
||||
}
|
||||
|
||||
// Increment version only if we have online disks less than configured storage disks.
|
||||
if diskCount(onlineDisks) < len(xl.storageDisks) {
|
||||
higherVersion++
|
||||
}
|
||||
erasure := newErasure(onlineDisks) // Initialize a new erasure with online disks
|
||||
|
||||
// Initialize a new erasure with online disks and new distribution.
|
||||
erasure := newErasure(onlineDisks, xlMeta.Erasure.Distribution)
|
||||
|
||||
partSuffix := fmt.Sprintf("object%d", partID)
|
||||
tmpPartPath := path.Join(tmpMetaPrefix, bucket, object, uploadID, partSuffix)
|
||||
|
||||
Reference in New Issue
Block a user