Browse Source

rename

pull/5512/head
chrislu 8 months ago
parent
commit
d9490c5e1f
  1. 2
      weed/server/master_grpc_server_assign.go
  2. 2
      weed/server/master_grpc_server_volume.go
  3. 4
      weed/server/master_server.go
  4. 2
      weed/server/master_server_handlers.go

2
weed/server/master_grpc_server_assign.go

@ -85,7 +85,7 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest
return nil, fmt.Errorf("no free volumes left for " + option.String())
}
vl.AddGrowRequest()
ms.vgCh <- &topology.VolumeGrowRequest{
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{
Option: option,
Count: int(req.WritableVolumeCount),
}

2
weed/server/master_grpc_server_volume.go

@ -22,7 +22,7 @@ func (ms *MasterServer) ProcessGrowRequest() {
go func() {
filter := sync.Map{}
for {
req, ok := <-ms.vgCh
req, ok := <-ms.volumeGrowthRequestChan
if !ok {
break
}

4
weed/server/master_server.go

@ -61,7 +61,7 @@ type MasterServer struct {
Topo *topology.Topology
vg *topology.VolumeGrowth
vgCh chan *topology.VolumeGrowRequest
volumeGrowthRequestChan chan *topology.VolumeGrowRequest
boundedLeaderChan chan int
@ -107,7 +107,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers map[string]pb.Se
ms := &MasterServer{
option: option,
preallocateSize: preallocateSize,
vgCh: make(chan *topology.VolumeGrowRequest, 1<<6),
volumeGrowthRequestChan: make(chan *topology.VolumeGrowRequest, 1<<6),
clientChans: make(map[string]chan *master_pb.KeepConnectedResponse),
grpcDialOption: grpcDialOption,
MasterClient: wdclient.NewMasterClient(grpcDialOption, "", cluster.MasterType, option.Master, "", "", *pb.NewServiceDiscoveryFromMap(peers)),

2
weed/server/master_server_handlers.go

@ -136,7 +136,7 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request)
return
}
vl.AddGrowRequest()
ms.vgCh <- &topology.VolumeGrowRequest{
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{
Option: option,
Count: writableVolumeCount,
}

Loading…
Cancel
Save