aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_encode.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-02-25 22:23:59 -0800
committerChris Lu <chris.lu@gmail.com>2020-02-25 22:23:59 -0800
commit97ab8a1976f3ba056af8d5b630dcb43006425b51 (patch)
treef98588240db017bf7d372b0f216355892cf868e8 /weed/shell/command_ec_encode.go
parentca4ca1ae6f87c6fcbf9c486722f36b4f07166187 (diff)
downloadseaweedfs-97ab8a1976f3ba056af8d5b630dcb43006425b51.tar.xz
seaweedfs-97ab8a1976f3ba056af8d5b630dcb43006425b51.zip
remove ctx if possible
Diffstat (limited to 'weed/shell/command_ec_encode.go')
-rw-r--r--weed/shell/command_ec_encode.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go
index e22691c00..6efb05488 100644
--- a/weed/shell/command_ec_encode.go
+++ b/weed/shell/command_ec_encode.go
@@ -107,7 +107,7 @@ func doEcEncode(commandEnv *CommandEnv, collection string, vid needle.VolumeId)
}
// balance the ec shards to current cluster
- err = spreadEcShards(context.Background(), commandEnv, vid, collection, locations)
+ err = spreadEcShards(commandEnv, vid, collection, locations)
if err != nil {
return fmt.Errorf("spread ec shards for volume %d from %s: %v", vid, locations[0].Url, err)
}
@@ -149,7 +149,7 @@ func generateEcShards(grpcDialOption grpc.DialOption, volumeId needle.VolumeId,
}
-func spreadEcShards(ctx context.Context, commandEnv *CommandEnv, volumeId needle.VolumeId, collection string, existingLocations []wdclient.Location) (err error) {
+func spreadEcShards(commandEnv *CommandEnv, volumeId needle.VolumeId, collection string, existingLocations []wdclient.Location) (err error) {
allEcNodes, totalFreeEcSlots, err := collectEcNodes(commandEnv, "")
if err != nil {