mirror of
https://github.com/minio/minio.git
synced 2025-11-24 19:46:16 -05:00
XL: Make allocations simpler avoid redundant allocs. (#1961)
- Reduce 10MiB buffers for loopy calls to use 128KiB. - start using 128KiB buffer where needed.
This commit is contained in:
@@ -201,8 +201,7 @@ func (xl xlObjects) readXLMetadata(bucket, object string) (xlMeta xlMetaV1, err
|
||||
if disk == nil {
|
||||
continue
|
||||
}
|
||||
var buf []byte
|
||||
buf, err = readAll(disk, bucket, path.Join(object, xlMetaJSONFile))
|
||||
xlMeta, err = readXLMeta(disk, bucket, object)
|
||||
if err != nil {
|
||||
// For any reason disk is not available continue and read from other disks.
|
||||
if err == errDiskNotFound || err == errFaultyDisk {
|
||||
@@ -210,10 +209,6 @@ func (xl xlObjects) readXLMetadata(bucket, object string) (xlMeta xlMetaV1, err
|
||||
}
|
||||
return xlMetaV1{}, err
|
||||
}
|
||||
err = json.Unmarshal(buf, &xlMeta)
|
||||
if err != nil {
|
||||
return xlMetaV1{}, err
|
||||
}
|
||||
break
|
||||
}
|
||||
return xlMeta, nil
|
||||
|
||||
Reference in New Issue
Block a user