diff options
| author | chrislu <chris.lu@gmail.com> | 2024-01-22 11:04:47 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-01-22 11:04:47 -0800 |
| commit | 5f35857cd0b542e5225f1a126e89ef0733588947 (patch) | |
| tree | de621fb4a2f92e3937f8f59a60707093c86c32a3 | |
| parent | 428fea45f33ac9807ad5783f394841d59ab49516 (diff) | |
| download | seaweedfs-5f35857cd0b542e5225f1a126e89ef0733588947.tar.xz seaweedfs-5f35857cd0b542e5225f1a126e89ef0733588947.zip | |
no need to assign partitions explicitly
| -rw-r--r-- | weed/mq/broker/broker_grpc_configure.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/weed/mq/broker/broker_grpc_configure.go b/weed/mq/broker/broker_grpc_configure.go index 9292a6184..c1984c05e 100644 --- a/weed/mq/broker/broker_grpc_configure.go +++ b/weed/mq/broker/broker_grpc_configure.go @@ -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 |
