mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 16:23:28 +03: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
+1
-1
@@ -82,7 +82,7 @@ func (xl xlObjects) listDir(bucket, prefixDir string, filter func(entry string)
|
||||
// getRandomDisk - gives a random disk at any point in time from the
|
||||
// available pool of disks.
|
||||
func (xl xlObjects) getRandomDisk() (disk StorageAPI) {
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
rand.Seed(time.Now().UTC().UnixNano()) // Seed with current time.
|
||||
randIndex := rand.Intn(len(xl.storageDisks) - 1)
|
||||
disk = xl.storageDisks[randIndex] // Pick a random disk.
|
||||
return disk
|
||||
|
||||
Reference in New Issue
Block a user