From 581cf6644cbceaf6484aa255986205ab65c4401d Mon Sep 17 00:00:00 2001 From: chrislu Date: Mon, 22 Jan 2024 00:52:55 -0800 Subject: [PATCH] lookup reads from filer instead of local memory --- weed/mq/broker/broker_grpc_lookup.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weed/mq/broker/broker_grpc_lookup.go b/weed/mq/broker/broker_grpc_lookup.go index fbf85dde7..0ba0b628c 100644 --- a/weed/mq/broker/broker_grpc_lookup.go +++ b/weed/mq/broker/broker_grpc_lookup.go @@ -3,6 +3,7 @@ package broker import ( "context" "fmt" + "github.com/seaweedfs/seaweedfs/weed/mq/topic" "github.com/seaweedfs/seaweedfs/weed/pb/mq_pb" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -26,7 +27,10 @@ func (b *MessageQueueBroker) LookupTopicBrokers(ctx context.Context, request *mq ret := &mq_pb.LookupTopicBrokersResponse{} ret.Topic = request.Topic - ret.BrokerPartitionAssignments = b.Balancer.LookupTopicPartitions(ret.Topic) + conf, err := b.readTopicConfFromFiler(topic.FromPbTopic(request.Topic)) + if err == nil { + ret.BrokerPartitionAssignments = conf.BrokerPartitionAssignments + } return ret, err }