Uploaded image for project: 'Apache RocketMQ'
  1. Apache RocketMQ
  2. ROCKETMQ-200

Cluster name is always missing when fetch ClusterInfo from name server

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.0-incubating
    • Fix Version/s: 4.1.0-incubating
    • Component/s: rocketmq-namesrv
    • Labels:
      None

      Description

      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.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user Jaskey opened a pull request:

          https://github.com/apache/incubator-rocketmq/pull/105

          ROCKETMQ-200-Cluster name is always missing when fetch ClusterInfo from name server

          https://issues.apache.org/jira/browse/ROCKETMQ-200

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/Jaskey/incubator-rocketmq ROCKETMQ-200-Cluster-missing

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/incubator-rocketmq/pull/105.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #105


          commit c52edde359f170530f77a36d2f0c6df50f2de1a9
          Author: Jaskey <linjunjie1103@gmail.com>
          Date: 2017-05-17T12:06:32Z

          Bug fix : Cluster name is always missing when fetch ClusterInfo from name server


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user Jaskey opened a pull request: https://github.com/apache/incubator-rocketmq/pull/105 ROCKETMQ-200 -Cluster name is always missing when fetch ClusterInfo from name server https://issues.apache.org/jira/browse/ROCKETMQ-200 You can merge this pull request into a Git repository by running: $ git pull https://github.com/Jaskey/incubator-rocketmq ROCKETMQ-200 -Cluster-missing Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/105.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #105 commit c52edde359f170530f77a36d2f0c6df50f2de1a9 Author: Jaskey <linjunjie1103@gmail.com> Date: 2017-05-17T12:06:32Z Bug fix : Cluster name is always missing when fetch ClusterInfo from name server
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/105

          [![Coverage Status](https://coveralls.io/builds/11563664/badge)](https://coveralls.io/builds/11563664)

          Coverage increased (+0.01%) to 37.899% when pulling *c52edde359f170530f77a36d2f0c6df50f2de1a9 on Jaskey:ROCKETMQ-200-Cluster-missing* into *1630f277b9c9f8e85c9bdb09a323d39e13e797e4 on apache:develop*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/105 [! [Coverage Status] ( https://coveralls.io/builds/11563664/badge)](https://coveralls.io/builds/11563664 ) Coverage increased (+0.01%) to 37.899% when pulling * c52edde359f170530f77a36d2f0c6df50f2de1a9 on Jaskey: ROCKETMQ-200 -Cluster-missing * into * 1630f277b9c9f8e85c9bdb09a323d39e13e797e4 on apache:develop *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user dongeforever commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/105

          LGTM @zhouxinyu @vongosling

          Show
          githubbot ASF GitHub Bot added a comment - Github user dongeforever commented on the issue: https://github.com/apache/incubator-rocketmq/pull/105 LGTM @zhouxinyu @vongosling
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on a diff in the pull request:

          https://github.com/apache/incubator-rocketmq/pull/105#discussion_r118622000

          — 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 –

          clusterName can be null here ?

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/105#discussion_r118622000 — 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 – clusterName can be null here ?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on a diff in the pull request:

          https://github.com/apache/incubator-rocketmq/pull/105#discussion_r118621860

          — Diff: common/src/main/java/org/apache/rocketmq/common/protocol/route/BrokerData.java —
          @@ -15,9 +15,7 @@

          • limitations under the License.
            */

          -/**

          • * $Id: BrokerData.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $
          • */
            +
              • End diff –

          excellent job

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/105#discussion_r118621860 — Diff: common/src/main/java/org/apache/rocketmq/common/protocol/route/BrokerData.java — @@ -15,9 +15,7 @@ limitations under the License. */ -/** * $Id: BrokerData.java 1835 2013-05-16 02:00:50Z vintagewang@apache.org $ */ + End diff – excellent job
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user dongeforever commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/105

          @zhouxinyu @lizhanhui it is time to merge this PR now, could you please have a double check?

          Show
          githubbot ASF GitHub Bot added a comment - Github user dongeforever commented on the issue: https://github.com/apache/incubator-rocketmq/pull/105 @zhouxinyu @lizhanhui it is time to merge this PR now, could you please have a double check?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zhouxinyu commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/105

          +1, thanks @Jaskey

          Show
          githubbot ASF GitHub Bot added a comment - Github user zhouxinyu commented on the issue: https://github.com/apache/incubator-rocketmq/pull/105 +1, thanks @Jaskey
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit c79614071b1941940f934c066bde5711062bdc7e in incubator-rocketmq's branch refs/heads/develop from Jaskey Lam
          [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=c796140 ]

          ROCKETMQ-200-Cluster name is always missing when fetch ClusterInfo from name server closes apache/incubator-rocketmq#105

          Show
          jira-bot ASF subversion and git services added a comment - Commit c79614071b1941940f934c066bde5711062bdc7e in incubator-rocketmq's branch refs/heads/develop from Jaskey Lam [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=c796140 ] ROCKETMQ-200 -Cluster name is always missing when fetch ClusterInfo from name server closes apache/incubator-rocketmq#105
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f115b528668736544f5a8632670655f875145f72 in incubator-rocketmq's branch refs/heads/master from Jaskey Lam
          [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f115b52 ]

          ROCKETMQ-200-Cluster name is always missing when fetch ClusterInfo from name server closes apache/incubator-rocketmq#105

          Show
          jira-bot ASF subversion and git services added a comment - Commit f115b528668736544f5a8632670655f875145f72 in incubator-rocketmq's branch refs/heads/master from Jaskey Lam [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f115b52 ] ROCKETMQ-200 -Cluster name is always missing when fetch ClusterInfo from name server closes apache/incubator-rocketmq#105
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/incubator-rocketmq/pull/105

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/incubator-rocketmq/pull/105

            People

            • Assignee:
              Jaskey Jaskey Lam
              Reporter:
              Jaskey Jaskey Lam
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development