diff options
Diffstat (limited to 'weed/server')
| -rw-r--r-- | weed/server/filer_grpc_server.go | 4 | ||||
| -rw-r--r-- | weed/server/filer_server.go | 2 | ||||
| -rw-r--r-- | weed/server/master_grpc_server.go | 8 | ||||
| -rw-r--r-- | weed/server/master_server.go | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/weed/server/filer_grpc_server.go b/weed/server/filer_grpc_server.go index 1df15d69f..87b1a6303 100644 --- a/weed/server/filer_grpc_server.go +++ b/weed/server/filer_grpc_server.go @@ -410,7 +410,7 @@ func (fs *FilerServer) GetFilerConfiguration(ctx context.Context, req *filer_pb. return t, nil } -func (fs *FilerServer) KeepConnected(stream filer_pb.SeaweedFiler_KeepConnectedServer) error { +func (fs *FilerServer) SubscribeVolumeLocationUpdates(stream filer_pb.SeaweedFiler_SubscribeVolumeLocationUpdatesServer) error { req, err := stream.Recv() if err != nil { @@ -435,7 +435,7 @@ func (fs *FilerServer) KeepConnected(stream filer_pb.SeaweedFiler_KeepConnectedS }() for { - if err := stream.Send(&filer_pb.KeepConnectedResponse{}); err != nil { + if err := stream.Send(&filer_pb.SubscribeVolumeLocationUpdatesResponse{}); err != nil { glog.V(0).Infof("send broker %v: %+v", clientName, err) return err } diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go index aa66b4187..9b8e8ba67 100644 --- a/weed/server/filer_server.go +++ b/weed/server/filer_server.go @@ -108,7 +108,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) fs.checkWithMaster() go stats.LoopPushingMetric("filer", string(fs.option.Host), fs.metricsAddress, fs.metricsIntervalSec) - go fs.filer.KeepConnectedToMaster() + go fs.filer.LoopConnectToMaster() v := util.GetViper() if !util.LoadConfiguration("filer", false) { diff --git a/weed/server/master_grpc_server.go b/weed/server/master_grpc_server.go index 53e28c5bf..756e80d57 100644 --- a/weed/server/master_grpc_server.go +++ b/weed/server/master_grpc_server.go @@ -176,9 +176,9 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ } } -// KeepConnected keep a stream gRPC call to the master. Used by clients to know the master is up. +// SubscribeVolumeLocationUpdates keep a stream gRPC call to the master. Used by clients to know the master is up. // And clients gets the up-to-date list of volume locations -func (ms *MasterServer) KeepConnected(stream master_pb.Seaweed_KeepConnectedServer) error { +func (ms *MasterServer) SubscribeVolumeLocationUpdates(stream master_pb.Seaweed_SubscribeVolumeLocationUpdatesServer) error { req, recvErr := stream.Recv() if recvErr != nil { @@ -238,7 +238,7 @@ func (ms *MasterServer) KeepConnected(stream master_pb.Seaweed_KeepConnectedServ } -func (ms *MasterServer) informNewLeader(stream master_pb.Seaweed_KeepConnectedServer) error { +func (ms *MasterServer) informNewLeader(stream master_pb.Seaweed_SubscribeVolumeLocationUpdatesServer) error { leader, err := ms.Topo.Leader() if err != nil { glog.Errorf("topo leader: %v", err) @@ -257,7 +257,7 @@ func (ms *MasterServer) addClient(clientType string, clientAddress pb.ServerAddr glog.V(0).Infof("+ client %v", clientName) // we buffer this because otherwise we end up in a potential deadlock where - // the KeepConnected loop is no longer listening on this channel but we're + // the SubscribeVolumeLocationUpdates loop is no longer listening on this channel but we're // trying to send to it in SendHeartbeat and so we can't lock the // clientChansLock to remove the channel and we're stuck writing to it // 100 is probably overkill diff --git a/weed/server/master_server.go b/weed/server/master_server.go index 653c4e003..3f1f1c082 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -243,7 +243,7 @@ func (ms *MasterServer) startAdminScripts() { reg, _ := regexp.Compile(`'.*?'|".*?"|\S+`) - go commandEnv.MasterClient.KeepConnectedToMaster() + go commandEnv.MasterClient.LoopConnectToMaster() go func() { commandEnv.MasterClient.WaitUntilConnected() |
