Skip to content

Conversation

RongtongJin
Copy link
Contributor

Make sure set the target branch to develop

What is the purpose of the change

fix #6316

Brief changelog

在Nameserver broker注册逻辑中,已经有以下逻辑保证多个master出现时选topicConfig中stateVersion更大的
image
因此在Controller模式中,当角色发生变化时,会利用epoch当作stateVersion当作版本号

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

codecov-commenter commented Mar 11, 2023

Codecov Report

Attention: Patch coverage is 41.17647% with 10 lines in your changes missing coverage. Please review.

Project coverage is 43.12%. Comparing base (3c770c9) to head (2cdedf4).
Report is 713 commits behind head on develop.

Files with missing lines Patch % Lines
...ache/rocketmq/broker/topic/TopicConfigManager.java 16.66% 4 Missing and 1 partial ⚠️
...he/rocketmq/broker/controller/ReplicasManager.java 0.00% 2 Missing ⚠️
...ocketmq/broker/processor/AdminBrokerProcessor.java 0.00% 2 Missing ⚠️
.../broker/subscription/SubscriptionGroupManager.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #6317      +/-   ##
=============================================
- Coverage      43.12%   43.12%   -0.01%     
- Complexity      8859     8861       +2     
=============================================
  Files           1094     1094              
  Lines          77284    77293       +9     
  Branches       10085    10090       +5     
=============================================
- Hits           33332    33329       -3     
- Misses         39790    39804      +14     
+ Partials        4162     4160       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RongtongJin
Copy link
Contributor Author

image

Copy link
Member

@mxsm mxsm left a comment

Choose a reason for hiding this comment

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

LGTM~

Copy link
Member

@TheR1sing3un TheR1sing3un left a comment

Choose a reason for hiding this comment

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

LGTM~

@RongtongJin RongtongJin added module/ha high availably related module/controller labels Mar 13, 2023
@ShannonDing ShannonDing merged commit 20dc5c9 into apache:develop Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module/controller module/ha high availably related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The nameserver should choose a master with a larger epoch when there are two masters in controller mode

5 participants