aboutsummaryrefslogtreecommitdiff
path: root/weed/command/benchmark.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-02-17 20:55:55 -0800
committerChris Lu <chris.lu@gmail.com>2021-02-17 20:55:55 -0800
commit6daa932f5c1571cc60cf89014cf17810d756dd6b (patch)
treea6c6fce133c0178efec6324c708f3371dcd4f180 /weed/command/benchmark.go
parentdd9f3a01049bef33046d3728d82b25b67b8533ac (diff)
downloadseaweedfs-6daa932f5c1571cc60cf89014cf17810d756dd6b.tar.xz
seaweedfs-6daa932f5c1571cc60cf89014cf17810d756dd6b.zip
refactoring to get master function, instead of passing master values directly
this will enable retrying later
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 370ec9eaf..e1b6d8d6c 100644
--- a/weed/command/benchmark.go
+++ b/weed/command/benchmark.go
@@ -238,12 +238,12 @@ 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(b.masterClient.GetMaster, b.grpcDialOption, ar); err == nil {
fp.Server, fp.Fid, fp.Collection = assignResult.Url, assignResult.Fid, *b.collection
if !isSecure && assignResult.Auth != "" {
isSecure = true
}
- if _, err := fp.Upload(0, b.masterClient.GetMaster(), false, assignResult.Auth, b.grpcDialOption); err == nil {
+ if _, err := fp.Upload(0, b.masterClient.GetMaster, false, assignResult.Auth, b.grpcDialOption); err == nil {
if random.Intn(100) < *b.deletePercentage {
s.total++
delayedDeleteChan <- &delayedFile{time.Now().Add(time.Second), fp}