mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-05-03 21:17:49 +08:00
rename
This commit is contained in:
parent
7d69552974
commit
f67c8309d8
@ -68,13 +68,13 @@ func (b *MessageQueueBroker) PublishMessage(stream mq_pb.SeaweedMessaging_Publis
|
||||
if localTopicPartition.FollowerStream == nil && len(initMessage.FollowerBrokers) > 0 {
|
||||
follower := initMessage.FollowerBrokers[0]
|
||||
ctx := stream.Context()
|
||||
localTopicPartition.GrpcConnection, err = pb.GrpcDial(ctx, follower, true, b.grpcDialOption)
|
||||
localTopicPartition.FollowerGrpcConnection, err = pb.GrpcDial(ctx, follower, true, b.grpcDialOption)
|
||||
if err != nil {
|
||||
response.Error = fmt.Sprintf("fail to dial %s: %v", follower, err)
|
||||
glog.Errorf("fail to dial %s: %v", follower, err)
|
||||
return stream.Send(response)
|
||||
}
|
||||
followerClient := mq_pb.NewSeaweedMessagingClient(localTopicPartition.GrpcConnection)
|
||||
followerClient := mq_pb.NewSeaweedMessagingClient(localTopicPartition.FollowerGrpcConnection)
|
||||
localTopicPartition.FollowerStream, err = followerClient.PublishFollowMe(ctx)
|
||||
if err != nil {
|
||||
response.Error = fmt.Sprintf("fail to create publish client: %v", err)
|
||||
@ -136,7 +136,7 @@ func (b *MessageQueueBroker) PublishMessage(stream mq_pb.SeaweedMessaging_Publis
|
||||
glog.Errorf("Error closing follower stream: %v", followErr)
|
||||
}
|
||||
println("closing grpcConnection to follower")
|
||||
localTopicPartition.GrpcConnection.Close()
|
||||
localTopicPartition.FollowerGrpcConnection.Close()
|
||||
}
|
||||
b.localTopicManager.RemoveTopicPartition(t, p)
|
||||
glog.V(0).Infof("Removed local topic %v partition %v", initMessage.Topic, initMessage.Partition)
|
||||
|
@ -28,8 +28,8 @@ type LocalPartition struct {
|
||||
Subscribers *LocalPartitionSubscribers
|
||||
FollowerId int32
|
||||
|
||||
FollowerStream mq_pb.SeaweedMessaging_PublishFollowMeClient
|
||||
GrpcConnection *grpc.ClientConn
|
||||
FollowerStream mq_pb.SeaweedMessaging_PublishFollowMeClient
|
||||
FollowerGrpcConnection *grpc.ClientConn
|
||||
}
|
||||
|
||||
var TIME_FORMAT = "2006-01-02-15-04-05"
|
||||
|
Loading…
Reference in New Issue
Block a user