mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-24 19:19:11 +08:00
passing value by checkWithMaster() instead
This commit is contained in:
parent
4d21de63ee
commit
be54eeb364
@ -12,7 +12,6 @@ import (
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/backend"
|
||||
"github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
"github.com/chrislusf/seaweedfs/weed/topology"
|
||||
)
|
||||
@ -73,9 +72,6 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
|
||||
glog.V(0).Infof("added volume server %v:%d", heartbeat.GetIp(), heartbeat.GetPort())
|
||||
if err := stream.Send(&master_pb.HeartbeatResponse{
|
||||
VolumeSizeLimit: uint64(ms.option.VolumeSizeLimitMB) * 1024 * 1024,
|
||||
MetricsAddress: ms.option.MetricsAddress,
|
||||
MetricsIntervalSeconds: uint32(ms.option.MetricsIntervalSec),
|
||||
StorageBackends: backend.ToPbStorageBackends(),
|
||||
}); err != nil {
|
||||
glog.Warningf("SendHeartbeat.Send volume size to %s:%d %v", dn.Ip, dn.Port, err)
|
||||
return err
|
||||
|
@ -133,13 +133,6 @@ func (vs *VolumeServer) doHeartbeat(masterNode, masterGrpcAddress string, grpcDi
|
||||
doneChan <- nil
|
||||
return
|
||||
}
|
||||
if in.GetMetricsAddress() != "" && vs.MetricsAddress != in.GetMetricsAddress() {
|
||||
vs.MetricsAddress = in.GetMetricsAddress()
|
||||
vs.MetricsIntervalSec = int(in.GetMetricsIntervalSeconds())
|
||||
}
|
||||
if len(in.StorageBackends) > 0 {
|
||||
backend.LoadFromPbStorageBackends(in.StorageBackends)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user