Browse Source

fix compilation

pull/3226/head
chrislu 3 years ago
parent
commit
0c13fc873c
  1. 5
      weed/server/master_server_handlers_admin.go

5
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"))

Loading…
Cancel
Save