publish to input buffer
currently, the input buffer may not exist when start to publish
This commit is contained in:
@@ -32,7 +32,6 @@ func (b *MessageQueueBroker) LookupTopicBrokers(ctx context.Context, request *mq
|
||||
ret.Topic = request.Topic
|
||||
if conf, err = b.readTopicConfFromFiler(t); err != nil {
|
||||
glog.V(0).Infof("lookup topic %s conf: %v", request.Topic, err)
|
||||
ret.BrokerPartitionAssignments = conf.BrokerPartitionAssignments
|
||||
} else {
|
||||
err = b.ensureTopicActiveAssignments(t, conf)
|
||||
}
|
||||
|
||||
@@ -37,8 +37,11 @@ func (b *MessageQueueBroker) readTopicConfFromFiler(t topic.Topic) (conf *mq_pb.
|
||||
topicDir := fmt.Sprintf("%s/%s/%s", filer.TopicsDir, t.Namespace, t.Name)
|
||||
if err = b.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error {
|
||||
data, err := filer.ReadInsideFiler(client, topicDir, "topic.conf")
|
||||
if err == filer_pb.ErrNotFound {
|
||||
return err
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("read topic %v partition %v conf: %v", t, err)
|
||||
return fmt.Errorf("read topic.conf of %v: %v", t, err)
|
||||
}
|
||||
// parse into filer conf object
|
||||
conf = &mq_pb.ConfigureTopicResponse{}
|
||||
|
||||
Reference in New Issue
Block a user