Skip to content

[ISSUE #4501] fix Namesrv auto discovery not work#4502

Merged
duhenglucky merged 7 commits intoapache:developfrom
francisoliverlee:develop
Jul 11, 2022
Merged

[ISSUE #4501] fix Namesrv auto discovery not work#4502
duhenglucky merged 7 commits intoapache:developfrom
francisoliverlee:develop

Conversation

@francisoliverlee
Copy link
Copy Markdown
Member

Make sure set the target branch to develop

What is the purpose of the change

XXXXX

Brief changelog

XX

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 23, 2022

Codecov Report

Merging #4502 (d66d11a) into develop (35ce9ad) will decrease coverage by 0.15%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             develop    #4502      +/-   ##
=============================================
- Coverage      48.25%   48.09%   -0.16%     
+ Complexity      5143     5113      -30     
=============================================
  Files            649      649              
  Lines          43037    43037              
  Branches        5629     5629              
=============================================
- Hits           20766    20698      -68     
- Misses         19768    19825      +57     
- Partials        2503     2514      +11     
Impacted Files Coverage Δ
...org/apache/rocketmq/broker/out/BrokerOuterAPI.java 46.47% <0.00%> (ø)
...g/apache/rocketmq/client/impl/MQClientAPIImpl.java 13.97% <0.00%> (ø)
...rg/apache/rocketmq/common/stats/StatsSnapshot.java 84.61% <0.00%> (-15.39%) ⬇️
...ache/rocketmq/common/stats/MomentStatsItemSet.java 39.13% <0.00%> (-13.05%) ⬇️
.../apache/rocketmq/common/stats/MomentStatsItem.java 38.09% <0.00%> (-9.53%) ⬇️
...org/apache/rocketmq/store/ha/WaitNotifyObject.java 66.07% <0.00%> (-5.36%) ⬇️
...va/org/apache/rocketmq/common/stats/StatsItem.java 50.83% <0.00%> (-5.00%) ⬇️
...org/apache/rocketmq/common/stats/StatsItemSet.java 44.77% <0.00%> (-4.48%) ⬇️
...lient/impl/consumer/DefaultMQPushConsumerImpl.java 40.84% <0.00%> (-3.00%) ⬇️
...ava/org/apache/rocketmq/filter/util/BitsArray.java 59.82% <0.00%> (-2.57%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35ce9ad...d66d11a. Read the comment docs.

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 23, 2022

Coverage Status

Coverage increased (+0.1%) to 52.118% when pulling d66d11a on francisoliverlee:develop into 35ce9ad on apache:develop.

public String fetchNameServerAddr() {
try {
String addrs = this.topAddressing.fetchNSAddr();
if (addrs != null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UtillAll.isBlank already has nullable checking

public static boolean isBlank(String str) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

public String fetchNameServerAddr() {
try {
String addrs = this.topAddressing.fetchNSAddr();
if (addrs != null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UtillAll.isBlank already has nullable checking

public static boolean isBlank(String str) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@ShannonDing ShannonDing requested a review from RongtongJin June 27, 2022 02:37
try {
String addrs = this.topAddressing.fetchNSAddr();
if (addrs != null) {
if (addrs != null && !UtilAll.isBlank(addrs)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to combine one with the following if.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

try {
String addrs = this.topAddressing.fetchNSAddr();
if (addrs != null) {
if (addrs != null && !UtilAll.isBlank(addrs)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to combine one with the following if.

Copy link
Copy Markdown
Member Author

@francisoliverlee francisoliverlee Jul 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@duhenglucky duhenglucky merged commit 4cf15db into apache:develop Jul 11, 2022
@duhenglucky duhenglucky added type/enhancement module/broker LTS 4.9.x This PR should cherry picked to LTS branch labels Jul 11, 2022
@duhenglucky duhenglucky added this to the 5.0.0 milestone Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LTS 4.9.x This PR should cherry picked to LTS branch module/broker type/enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants