mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02: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:
@@ -268,7 +268,7 @@ func (z *xlMetaV2) AddVersion(fi FileInfo) error {
|
||||
PartSizes: make([]int64, len(fi.Parts)),
|
||||
PartActualSizes: make([]int64, len(fi.Parts)),
|
||||
MetaSys: make(map[string][]byte),
|
||||
MetaUser: make(map[string]string),
|
||||
MetaUser: make(map[string]string, len(fi.Metadata)),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user