mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
implement putMetacacheObject() optimizing List operations (#12903)
removes unexpected features from regular putObject() such as - increasing parity when disks are down, avoids a lot of DiskInfo() calls. - triggering MRF for metacache objects if disks are offline - avoiding renames from temporary location to actual namespace, not needed since metacache files are unique.
This commit is contained in:
@@ -648,9 +648,8 @@ func (er *erasureObjects) saveMetaCacheStream(ctx context.Context, mc *metaCache
|
||||
r, err := hash.NewReader(bytes.NewReader(b.data), int64(len(b.data)), "", "", int64(len(b.data)))
|
||||
logger.LogIf(ctx, err)
|
||||
custom := b.headerKV()
|
||||
_, err = er.putObject(ctx, minioMetaBucket, o.objectPath(b.n), NewPutObjReader(r), ObjectOptions{
|
||||
_, err = er.putMetacacheObject(ctx, o.objectPath(b.n), NewPutObjReader(r), ObjectOptions{
|
||||
UserDefined: custom,
|
||||
NoLock: true, // No need to hold namespace lock, each prefix caches uniquely.
|
||||
})
|
||||
if err != nil {
|
||||
mc.setErr(err.Error())
|
||||
|
||||
Reference in New Issue
Block a user