-
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
[ISSUE #5929] Fix the issue that broker send heartbeat to controller frequently causing thread blocking when the network partition #5930
Conversation
…sing thread blocking when the network partition
Codecov Report
@@ Coverage Diff @@
## develop #5930 +/- ##
==========================================
Coverage 43.34% 43.34%
- Complexity 8802 8806 +4
==========================================
Files 1090 1090
Lines 76435 76467 +32
Branches 9987 9993 +6
==========================================
+ Hits 33129 33148 +19
- Misses 39166 39179 +13
Partials 4140 4140
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
# Conflicts: # broker/src/main/java/org/apache/rocketmq/broker/controller/ReplicasManager.java
broker/src/main/java/org/apache/rocketmq/broker/controller/ReplicasManager.java
Outdated
Show resolved
Hide resolved
public List<String> getAvailableControllerAddresses() { | ||
return new ArrayList<>(availableControllerAddresses.keySet()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about set ArrayList initialCapacity to prevent expansion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list will not expand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~
remoting/src/main/java/org/apache/rocketmq/remoting/RemotingClient.java
Outdated
Show resolved
Hide resolved
…oller frequently causing thread blocking when the network partition (apache#5930) * Fix the issue that broker send heartbeat to controller frequently causing thread blocking when the network partition * Fix the ReplicasManagerTest can not pass * Reslove conflict with apache#5922 * Fix code style * Rename isAddressCanConnect to isAddressReachable * Rename isAddressCanConnect to isAddressReachable
…frequently causing thread blocking when the network partition (#5930) * Fix the issue that broker send heartbeat to controller frequently causing thread blocking when the network partition * Fix the ReplicasManagerTest can not pass * Reslove conflict with #5922 * Fix code style * Rename isAddressCanConnect to isAddressReachable * Rename isAddressCanConnect to isAddressReachable
Make sure set the target branch to
develop
What is the purpose of the change
Close #5929
Fix the issue that broker send heartbeat to controller frequently causing thread blocking when the network partition
Brief changelog
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
.[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.