aboutsummaryrefslogtreecommitdiff
path: root/weed/command/benchmark.go
diff options
context:
space:
mode:
authorAleksey Kosov <rusyak777@list.ru>2025-05-28 21:34:02 +0300
committerGitHub <noreply@github.com>2025-05-28 11:34:02 -0700
commit283d9e0079d5deb57aefe9a7b30e8b9869ba8685 (patch)
tree87b09bebed2ee4afc9c2a4f711ac8598fe2949b7 /weed/command/benchmark.go
parent62aaaa18f3ea8b7600d28934580dc220ca95164a (diff)
downloadseaweedfs-283d9e0079d5deb57aefe9a7b30e8b9869ba8685.tar.xz
seaweedfs-283d9e0079d5deb57aefe9a7b30e8b9869ba8685.zip
Add context with request (#6824)
Diffstat (limited to 'weed/command/benchmark.go')
-rw-r--r--weed/command/benchmark.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/benchmark.go b/weed/command/benchmark.go
index 08db2ef3d..715ae3d67 100644
--- a/weed/command/benchmark.go
+++ b/weed/command/benchmark.go
@@ -241,7 +241,7 @@ func writeFiles(idChan chan int, fileIdLineChan chan string, s *stat) {
Replication: *b.replication,
DiskType: *b.diskType,
}
- if assignResult, err := operation.Assign(b.masterClient.GetMaster, b.grpcDialOption, ar); err == nil {
+ if assignResult, err := operation.Assign(context.Background(), b.masterClient.GetMaster, b.grpcDialOption, ar); err == nil {
fp.Server, fp.Fid, fp.Pref.Collection = assignResult.Url, assignResult.Fid, *b.collection
if !isSecure && assignResult.Auth != "" {
isSecure = true
@@ -288,7 +288,7 @@ func readFiles(fileIdLineChan chan string, s *stat) {
start := time.Now()
var bytesRead int
var err error
- urls, err := b.masterClient.LookupFileId(fid)
+ urls, err := b.masterClient.LookupFileId(context.Background(), fid)
if err != nil {
s.failed++
println("!!!! ", fid, " location not found!!!!!")