mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -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:
@@ -331,8 +331,9 @@ func logIf(ctx context.Context, err error, errKind ...interface{}) {
|
||||
API = req.API
|
||||
}
|
||||
|
||||
tags := make(map[string]string)
|
||||
for _, entry := range req.GetTags() {
|
||||
kv := req.GetTags()
|
||||
tags := make(map[string]string, len(kv))
|
||||
for _, entry := range kv {
|
||||
tags[entry.Key] = entry.Val
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user