diff options
| author | chrislu <chris.lu@gmail.com> | 2022-06-23 00:45:11 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-06-23 00:45:11 -0700 |
| commit | 0c13fc873c9606f65a9eefb3f6063c9b06a0a188 (patch) | |
| tree | 0ebcd48d38383a287b79c8e1f59a40bc10465e55 /weed/server/master_server_handlers_admin.go | |
| parent | 96496d5286ca172bf3237d856b2273a0b85e6819 (diff) | |
| download | seaweedfs-0c13fc873c9606f65a9eefb3f6063c9b06a0a188.tar.xz seaweedfs-0c13fc873c9606f65a9eefb3f6063c9b06a0a188.zip | |
fix compilation
Diffstat (limited to 'weed/server/master_server_handlers_admin.go')
| -rw-r--r-- | weed/server/master_server_handlers_admin.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go index ade750ccc..47abfb892 100644 --- a/weed/server/master_server_handlers_admin.go +++ b/weed/server/master_server_handlers_admin.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "github.com/chrislusf/seaweedfs/weed/pb" + "github.com/chrislusf/seaweedfs/weed/pb/master_pb" "math/rand" "net/http" "strconv" @@ -81,7 +82,9 @@ func (ms *MasterServer) volumeGrowHandler(w http.ResponseWriter, r *http.Request if ms.Topo.AvailableSpaceFor(option) < int64(count*option.ReplicaPlacement.GetCopyCount()) { err = fmt.Errorf("only %d volumes left, not enough for %d", ms.Topo.AvailableSpaceFor(option), count*option.ReplicaPlacement.GetCopyCount()) } else { - count, err = ms.vg.GrowByCountAndType(ms.grpcDialOption, count, option, ms.Topo) + var newVidLocations []*master_pb.VolumeLocation + newVidLocations, err = ms.vg.GrowByCountAndType(ms.grpcDialOption, count, option, ms.Topo) + count = len(newVidLocations) } } else { err = fmt.Errorf("can not parse parameter count %s", r.FormValue("count")) |
