Skip to content

Commit

Permalink
fix: warp concurrent crash on PUT
Browse files Browse the repository at this point in the history
A regression caused by minio#349
  • Loading branch information
harshavardhana committed Dec 23, 2024
1 parent 2bd850d commit 55ea5e7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/bench/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,18 @@ func (u *Put) Start(ctx context.Context, wait chan struct{}) (Operations, error)
go func(i int) {
rcv := c.Receiver()
defer wg.Done()

// Copy usermetadata and usertags per concurrent thread.
opts := u.PutOpts
opts.UserMetadata = make(map[string]string, len(u.PutOpts.UserMetadata))
opts.UserTags = make(map[string]string, len(u.PutOpts.UserTags))
for k, v := range u.PutOpts.UserMetadata {
opts.UserMetadata[k] = v
}
for k, v := range u.PutOpts.UserTags {
opts.UserTags[k] = v
}

done := ctx.Done()

<-wait
Expand Down

0 comments on commit 55ea5e7

Please sign in to comment.