mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08:00
rename
This commit is contained in:
parent
0bdf121e51
commit
d9490c5e1f
@ -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())
|
return nil, fmt.Errorf("no free volumes left for " + option.String())
|
||||||
}
|
}
|
||||||
vl.AddGrowRequest()
|
vl.AddGrowRequest()
|
||||||
ms.vgCh <- &topology.VolumeGrowRequest{
|
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{
|
||||||
Option: option,
|
Option: option,
|
||||||
Count: int(req.WritableVolumeCount),
|
Count: int(req.WritableVolumeCount),
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ func (ms *MasterServer) ProcessGrowRequest() {
|
|||||||
go func() {
|
go func() {
|
||||||
filter := sync.Map{}
|
filter := sync.Map{}
|
||||||
for {
|
for {
|
||||||
req, ok := <-ms.vgCh
|
req, ok := <-ms.volumeGrowthRequestChan
|
||||||
if !ok {
|
if !ok {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -60,8 +60,8 @@ type MasterServer struct {
|
|||||||
preallocateSize int64
|
preallocateSize int64
|
||||||
|
|
||||||
Topo *topology.Topology
|
Topo *topology.Topology
|
||||||
vg *topology.VolumeGrowth
|
vg *topology.VolumeGrowth
|
||||||
vgCh chan *topology.VolumeGrowRequest
|
volumeGrowthRequestChan chan *topology.VolumeGrowRequest
|
||||||
|
|
||||||
boundedLeaderChan chan int
|
boundedLeaderChan chan int
|
||||||
|
|
||||||
@ -105,14 +105,14 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers map[string]pb.Se
|
|||||||
|
|
||||||
grpcDialOption := security.LoadClientTLS(v, "grpc.master")
|
grpcDialOption := security.LoadClientTLS(v, "grpc.master")
|
||||||
ms := &MasterServer{
|
ms := &MasterServer{
|
||||||
option: option,
|
option: option,
|
||||||
preallocateSize: preallocateSize,
|
preallocateSize: preallocateSize,
|
||||||
vgCh: make(chan *topology.VolumeGrowRequest, 1<<6),
|
volumeGrowthRequestChan: make(chan *topology.VolumeGrowRequest, 1<<6),
|
||||||
clientChans: make(map[string]chan *master_pb.KeepConnectedResponse),
|
clientChans: make(map[string]chan *master_pb.KeepConnectedResponse),
|
||||||
grpcDialOption: grpcDialOption,
|
grpcDialOption: grpcDialOption,
|
||||||
MasterClient: wdclient.NewMasterClient(grpcDialOption, "", cluster.MasterType, option.Master, "", "", *pb.NewServiceDiscoveryFromMap(peers)),
|
MasterClient: wdclient.NewMasterClient(grpcDialOption, "", cluster.MasterType, option.Master, "", "", *pb.NewServiceDiscoveryFromMap(peers)),
|
||||||
adminLocks: NewAdminLocks(),
|
adminLocks: NewAdminLocks(),
|
||||||
Cluster: cluster.NewCluster(),
|
Cluster: cluster.NewCluster(),
|
||||||
}
|
}
|
||||||
ms.boundedLeaderChan = make(chan int, 16)
|
ms.boundedLeaderChan = make(chan int, 16)
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ func (ms *MasterServer) dirAssignHandler(w http.ResponseWriter, r *http.Request)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
vl.AddGrowRequest()
|
vl.AddGrowRequest()
|
||||||
ms.vgCh <- &topology.VolumeGrowRequest{
|
ms.volumeGrowthRequestChan <- &topology.VolumeGrowRequest{
|
||||||
Option: option,
|
Option: option,
|
||||||
Count: writableVolumeCount,
|
Count: writableVolumeCount,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user