master: rename grpc function KeepConnected() to SubscribeVolumeLocationUpdates()

This commit is contained in:
Chris Lu
2021-11-03 01:09:48 -07:00
parent ab97b17e62
commit af71ae11aa
16 changed files with 696 additions and 687 deletions

View File

@@ -50,20 +50,20 @@ func (broker *MessageBroker) keepConnectedToOneFiler() {
broker.withFilerClient(filer, func(client filer_pb.SeaweedFilerClient) error {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
stream, err := client.KeepConnected(ctx)
stream, err := client.SubscribeVolumeLocationUpdates(ctx)
if err != nil {
glog.V(0).Infof("%s:%d failed to keep connected to %s: %v", broker.option.Ip, broker.option.Port, filer, err)
return err
}
initRequest := &filer_pb.KeepConnectedRequest{
initRequest := &filer_pb.SubscribeVolumeLocationUpdatesRequest{
Name: broker.option.Ip,
GrpcPort: uint32(broker.option.Port),
}
for _, tp := range broker.topicManager.ListTopicPartitions() {
initRequest.Resources = append(initRequest.Resources, tp.String())
}
if err := stream.Send(&filer_pb.KeepConnectedRequest{
if err := stream.Send(&filer_pb.SubscribeVolumeLocationUpdatesRequest{
Name: broker.option.Ip,
GrpcPort: uint32(broker.option.Port),
}); err != nil {
@@ -75,7 +75,7 @@ func (broker *MessageBroker) keepConnectedToOneFiler() {
glog.V(0).Infof("conntected with filer: %v", filer)
for {
if err := stream.Send(&filer_pb.KeepConnectedRequest{
if err := stream.Send(&filer_pb.SubscribeVolumeLocationUpdatesRequest{
Name: broker.option.Ip,
GrpcPort: uint32(broker.option.Port),
}); err != nil {