-
Notifications
You must be signed in to change notification settings - Fork 11.5k
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
[Summer of Code] Support switch role for broker #4272
Merged
RongtongJin
merged 19 commits into
apache:5.0.0-beta-dledger-controller
from
hzh0425:feature/role-switch
May 16, 2022
Merged
[Summer of Code] Support switch role for broker #4272
RongtongJin
merged 19 commits into
apache:5.0.0-beta-dledger-controller
from
hzh0425:feature/role-switch
May 16, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RongtongJin
reviewed
May 11, 2022
broker/src/main/java/org/apache/rocketmq/broker/hacontroller/HaControllerProxy.java
Outdated
Show resolved
Hide resolved
broker/src/main/java/org/apache/rocketmq/broker/hacontroller/HaControllerProxy.java
Outdated
Show resolved
Hide resolved
broker/src/main/java/org/apache/rocketmq/broker/hacontroller/ReplicasManager.java
Outdated
Show resolved
Hide resolved
broker/src/main/java/org/apache/rocketmq/broker/hacontroller/ReplicasManager.java
Outdated
Show resolved
Hide resolved
broker/src/main/java/org/apache/rocketmq/broker/hacontroller/ReplicasManager.java
Outdated
Show resolved
Hide resolved
container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java
Outdated
Show resolved
Hide resolved
namesrv/src/main/java/org/apache/rocketmq/namesrv/controller/manager/BrokerInfo.java
Outdated
Show resolved
Hide resolved
RongtongJin
reviewed
May 12, 2022
broker/src/main/java/org/apache/rocketmq/broker/hacontroller/ReplicasManager.java
Outdated
Show resolved
Hide resolved
broker/src/main/java/org/apache/rocketmq/broker/hacontroller/ReplicasManager.java
Outdated
Show resolved
Hide resolved
test/src/test/java/org/apache/rocketmq/test/autoswitchrole/AutoSwitchRoleIntegrationTest.java
Show resolved
Hide resolved
broker/src/main/java/org/apache/rocketmq/broker/hacontroller/ReplicasManager.java
Outdated
Show resolved
Hide resolved
container/src/main/java/org/apache/rocketmq/container/InnerBrokerController.java
Outdated
Show resolved
Hide resolved
store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAClient.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## 5.0.0-beta-dledger-controller #4272 +/- ##
===================================================================
- Coverage 43.73% 43.56% -0.17%
- Complexity 6272 6288 +16
===================================================================
Files 827 829 +2
Lines 58610 58937 +327
Branches 8003 8046 +43
===================================================================
+ Hits 25634 25678 +44
- Misses 29670 29942 +272
- Partials 3306 3317 +11
Continue to review full report at Codecov.
|
RongtongJin
approved these changes
May 16, 2022
RongtongJin
approved these changes
May 16, 2022
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
tracking issue: #4330
We want unified log replication, using rocketmq's original HaService instead of dledger mode.
Previously, I have done the following job with @RongtongJin
This pr is the last pr: connecting the interface of Dledger-controller at the Broker level, so that the Broker has the ability of master-slave switching
Noted that this Pr is still in development and not fully completed.
Brief changelog
The architecture is shown in the figure below. The pr is a link between the 'DledgerController' and 'AutoSwitchHASerivce' through a new component - ReplicasManager, it connects to the api of the controller and notifies the lower AutoSwitchHASerivce.
Verifying this change
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
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.