Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #6537] Fix bug MessageStoreConfig.haListenPort item config not… #6538

Merged
merged 14 commits into from
Apr 25, 2023

Conversation

hhy50
Copy link
Contributor

@hhy50 hhy50 commented Apr 5, 2023

[fix] fix6537

After the configuration file is loaded, it was overwritten by the subsequent setHaListenPort

After removing this line of code, the configuration takes effect

@@ -167,7 +167,6 @@ public static BrokerController buildBrokerController(String[] args) throws Excep
System.exit(-4);
}

messageStoreConfig.setHaListenPort(nettyServerConfig.getListenPort() + 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

If the user has not configured it, could the default port for HA be set to nettyServerConfig.getListenPort() + 1 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

haListenPort default value is nettyServerConfig.getListenPort()'default value +1

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nettyServerConfig.listenPort default value is 10911

image

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO this PR will break the compatibility, that is, the default value of haLitenPort is listenPort + 1. Users setting listenPort but not setting haLitenPort explicitly will find haLitenPort changes after updating to new version.

The more appropriate way may be:

  • if haLitenPort is set explicitly, use the value set by user;
  • if haLitenPort is not set, assign listenPort + 1 to it.

@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration .github/workflows/codeql_analysis.yml:CodeQL-Build. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

RongtongJin
RongtongJin previously approved these changes Apr 6, 2023
@hhy50
Copy link
Contributor Author

hhy50 commented Apr 6, 2023

@RongtongJin I see that you have approved it, but ci test not pass, what do i need todo

GenerousMan
GenerousMan previously approved these changes Apr 7, 2023
TheR1sing3un
TheR1sing3un previously approved these changes Apr 8, 2023
@TheR1sing3un
Copy link
Member

@RongtongJin I see that you have approved it, but ci test not pass, what do i need todo

You can trigger CI again by command: git commit --allow-empty -m "rerun" && git push

@codecov-commenter
Copy link

codecov-commenter commented Apr 10, 2023

Codecov Report

Merging #6538 (7847646) into develop (af6a95f) will increase coverage by 0.01%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             develop    #6538      +/-   ##
=============================================
+ Coverage      43.07%   43.09%   +0.01%     
- Complexity      8990     8991       +1     
=============================================
  Files           1107     1107              
  Lines          78289    78291       +2     
  Branches       10203    10204       +1     
=============================================
+ Hits           33725    33740      +15     
+ Misses         40341    40324      -17     
- Partials        4223     4227       +4     
Impacted Files Coverage Δ
...java/org/apache/rocketmq/broker/BrokerStartup.java 6.36% <0.00%> (-0.09%) ⬇️

... and 21 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -167,7 +167,6 @@ public static BrokerController buildBrokerController(String[] args) throws Excep
System.exit(-4);
}

messageStoreConfig.setHaListenPort(nettyServerConfig.getListenPort() + 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO this PR will break the compatibility, that is, the default value of haLitenPort is listenPort + 1. Users setting listenPort but not setting haLitenPort explicitly will find haLitenPort changes after updating to new version.

The more appropriate way may be:

  • if haLitenPort is set explicitly, use the value set by user;
  • if haLitenPort is not set, assign listenPort + 1 to it.

@hhy50
Copy link
Contributor Author

hhy50 commented Apr 10, 2023

@caigy Thank you for your suggestion. I have resubmitted it

@hhy50 hhy50 requested a review from caigy April 10, 2023 05:56
Copy link
Contributor

@caigy caigy left a comment

Choose a reason for hiding this comment

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

LGTM

@zhouxinyu zhouxinyu merged commit fad3dec into apache:develop Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants