mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-28 05:15:00 +08:00
no need to assign partitions explicitly
This commit is contained in:
parent
428fea45f3
commit
5f35857cd0
@ -37,6 +37,9 @@ func (b *MessageQueueBroker) ConfigureTopic(ctx context.Context, request *mq_pb.
|
||||
glog.V(0).Infof("read topic %s conf: %v", request.Topic, err)
|
||||
} else {
|
||||
err = b.ensureTopicActiveAssignments(t, resp)
|
||||
// no need to assign directly.
|
||||
// The added or updated assignees will read from filer directly.
|
||||
// The gone assignees will die by themselves.
|
||||
}
|
||||
if err == nil && len(resp.BrokerPartitionAssignments) == int(request.PartitionCount) {
|
||||
glog.V(0).Infof("existing topic partitions %d: %+v", len(resp.BrokerPartitionAssignments), resp.BrokerPartitionAssignments)
|
||||
@ -55,10 +58,6 @@ func (b *MessageQueueBroker) ConfigureTopic(ctx context.Context, request *mq_pb.
|
||||
b.Balancer.OnPartitionChange(request.Topic, resp.BrokerPartitionAssignments)
|
||||
}
|
||||
|
||||
if assignErr := b.assignTopicPartitionsToBrokers(ctx, request.Topic, resp.BrokerPartitionAssignments, true); assignErr != nil {
|
||||
return nil, assignErr
|
||||
}
|
||||
|
||||
glog.V(0).Infof("ConfigureTopic: topic %s partition assignments: %v", request.Topic, resp.BrokerPartitionAssignments)
|
||||
|
||||
return resp, err
|
||||
|
Loading…
Reference in New Issue
Block a user