You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@rocketmq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/06/01 06:25:04 UTC
[jira] [Commented] (ROCKETMQ-200) Cluster name is always missing
when fetch ClusterInfo from name server
[ https://issues.apache.org/jira/browse/ROCKETMQ-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16032526#comment-16032526 ]
ASF GitHub Bot commented on ROCKETMQ-200:
-----------------------------------------
Github user Jaskey commented on a diff in the pull request:
https://github.com/apache/incubator-rocketmq/pull/105#discussion_r119535996
--- Diff: namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java ---
@@ -125,11 +125,7 @@ public RegisterBrokerResult registerBroker(
BrokerData brokerData = this.brokerAddrTable.get(brokerName);
if (null == brokerData) {
registerFirst = true;
- brokerData = new BrokerData();
- brokerData.setBrokerName(brokerName);
- HashMap<Long, String> brokerAddrs = new HashMap<Long, String>();
- brokerData.setBrokerAddrs(brokerAddrs);
-
+ brokerData = new BrokerData(clusterName, brokerName, new HashMap<Long, String>());
--- End diff --
this cluster name is passed from the caller, it should be maintained by the caller.
> Cluster name is always missing when fetch ClusterInfo from name server
> ----------------------------------------------------------------------
>
> Key: ROCKETMQ-200
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-200
> Project: Apache RocketMQ
> Issue Type: Bug
> Components: rocketmq-namesrv
> Affects Versions: 4.1.0-incubating
> Reporter: Jaskey Lam
> Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> There are some BrokerData in the ClusterInfo, while the clsuter in the BrokerData is always null since the cluster info is never set when create this instance.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)