[
https://issues.apache.org/jira/browse/ROCKETMQ-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16387364#comment-16387364
]
ASF GitHub Bot commented on ROCKETMQ-319:
-----------------------------------------
vongosling commented on a change in pull request #205: [ROCKETMQ-319] improve
broker register performance and reduce memory usage
URL: https://github.com/apache/rocketmq/pull/205#discussion_r172422121
##########
File path:
broker/src/main/java/org/apache/rocketmq/broker/out/BrokerOuterAPI.java
##########
@@ -231,6 +259,72 @@ public void unregisterBroker(
throw new MQBrokerException(response.getCode(), response.getRemark());
}
+ public List<Boolean> needRegister(
+ final String clusterName,
+ final String brokerAddr,
+ final String brokerName,
+ final long brokerId,
+ final TopicConfigSerializeWrapper topicConfigWrapper,
+ final int timeoutMills) {
+ final List<Boolean> changedList = new CopyOnWriteArrayList<>();
+ List<String> nameServerAddressList =
this.remotingClient.getNameServerAddressList();
+ if (nameServerAddressList != null && nameServerAddressList.size() > 0)
{
+ final CountDownLatch countDownLatch = new
CountDownLatch(nameServerAddressList.size());
+ for (final String namesrvAddr : nameServerAddressList) {
+ brokerOuterExecutor.execute(new Runnable() {
+ @Override
+ public void run() {
Review comment:
while when we use thread in RocketMQ, we must be cautious about its work
queue, initialization, exception handler, and graceful shutdown
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> improve broker register performance and reduce memory usage
> -----------------------------------------------------------
>
> Key: ROCKETMQ-319
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-319
> Project: Apache RocketMQ
> Issue Type: Bug
> Components: rocketmq-broker, rocketmq-namesrv
> Affects Versions: 4.0.0-incubating, 4.1.0-incubating
> Reporter: yubaofu
> Assignee: yukon
> Priority: Major
>
> when MQ broker cluster manage topic size very large, eg 10,000+,when MQ
> Broker register meta info to name server,cause mq broker gc problem,so we
> fixed it .
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)