mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Copy metadata before spawning goroutine + prealloc maps (#10458)
In `(*cacheObjects).GetObjectNInfo` copy the metadata before spawning a goroutine. Clean up a few map[string]string copies as well, reducing allocs and simplifying the code. Fixes #10426
This commit is contained in:
@@ -882,7 +882,7 @@ func (a *azureObjects) PutObject(ctx context.Context, bucket, object string, r *
|
||||
data := r.Reader
|
||||
|
||||
if data.Size() > azureBlockSize/2 {
|
||||
if len(opts.UserDefined) == 0 {
|
||||
if opts.UserDefined == nil {
|
||||
opts.UserDefined = map[string]string{}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user