mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Tweak readall allocation and renameData buffer reuse (#13108)
Use a single allocation for reading the file, not the growing buffer of `io.ReadAll`. Reuse the write buffer if we can when writing metadata in RenameData.
This commit is contained in:
@@ -2091,7 +2091,8 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, f
|
||||
return err
|
||||
}
|
||||
|
||||
dstBuf, err = xlMeta.AppendTo(nil)
|
||||
dstBuf, err = xlMeta.AppendTo(metaDataPoolGet())
|
||||
defer metaDataPoolPut(dstBuf)
|
||||
if err != nil {
|
||||
logger.LogIf(ctx, err)
|
||||
if legacyPreserved {
|
||||
|
||||
Reference in New Issue
Block a user