Skip to content

Conversation

hzh0425
Copy link
Member

@hzh0425 hzh0425 commented Jun 11, 2022

Make sure set the target branch to develop

What is the purpose of the change

tracking issue: #4330

Brief changelog

Let broker register to controller again when master not existed.

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.

@hzh0425
Copy link
Member Author

hzh0425 commented Jun 11, 2022

问题场景: master shutdown, 刚好 slave 和 controller 网络分区并且 slave 在 syncStateSet 中, 此时 slave 无法被选为 master. 后续 slave 从分区中恢复, 也没有重新注册到 controller 上.

@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2022

Codecov Report

Merging #4450 (d59d970) into 5.0.0-beta-dledger-controller (81dc938) will increase coverage by 0.07%.
The diff coverage is 16.66%.

@@                         Coverage Diff                         @@
##             5.0.0-beta-dledger-controller    #4450      +/-   ##
===================================================================
+ Coverage                            43.17%   43.24%   +0.07%     
- Complexity                            6343     6360      +17     
===================================================================
  Files                                  841      841              
  Lines                                59824    59835      +11     
  Branches                              8152     8155       +3     
===================================================================
+ Hits                                 25830    25878      +48     
+ Misses                               30643    30609      -34     
+ Partials                              3351     3348       -3     
Impacted Files Coverage Δ
.../rocketmq/broker/hacontroller/ReplicasManager.java 0.00% <0.00%> (ø)
...q/controller/impl/manager/ReplicasInfoManager.java 63.22% <16.66%> (-1.29%) ⬇️
...he/rocketmq/controller/impl/DLedgerController.java 75.13% <100.00%> (+5.18%) ⬆️
...org/apache/rocketmq/common/stats/StatsItemSet.java 43.28% <0.00%> (-7.47%) ⬇️
...ache/rocketmq/common/stats/MomentStatsItemSet.java 39.13% <0.00%> (-4.35%) ⬇️
...mq/broker/topic/TopicQueueMappingCleanService.java 12.43% <0.00%> (-3.63%) ⬇️
...org/apache/rocketmq/store/DefaultMessageStore.java 53.88% <0.00%> (ø)
...controller/impl/DLedgerControllerStateMachine.java 85.00% <0.00%> (ø)
...cketmq/broker/processor/PopBufferMergeService.java 40.71% <0.00%> (+0.23%) ⬆️
...mq/client/impl/producer/DefaultMQProducerImpl.java 44.91% <0.00%> (+0.24%) ⬆️
... and 19 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 81dc938...d59d970. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 47.307% when pulling d59d970 on hzh0425:feature/detect-no-master into 6645d0a on apache:5.0.0-beta-dledger-controller.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 47.307% when pulling d59d970 on hzh0425:feature/detect-no-master into 6645d0a on apache:5.0.0-beta-dledger-controller.

@RongtongJin RongtongJin merged commit 5eaeeab into apache:5.0.0-beta-dledger-controller Jun 12, 2022
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.

5 participants