-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][broker] Fix the wrong behaviour when set overrideBrokerNicSpeedGbps
#18818
Conversation
@mattisonchao Please add the following content to your PR description and select a checkbox:
|
...-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LinuxBrokerHostUsageImplTest.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #18818 +/- ##
============================================
- Coverage 50.05% 47.02% -3.04%
+ Complexity 11024 10533 -491
============================================
Files 703 703
Lines 68814 68817 +3
Branches 7378 7377 -1
============================================
- Hits 34446 32359 -2087
- Misses 30621 32818 +2197
+ Partials 3747 3640 -107
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -121,10 +122,12 @@ public void calculateBrokerHostUsage() { | |||
this.usage = usage; | |||
} | |||
|
|||
private double getTotalNicLimitWithConfiguration(List<String> nics) { | |||
@VisibleForTesting | |||
public double getTotalNicLimitWithConfiguration(List<String> nics) { |
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.
it's a public method, so can delete @VisibleForTesting
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.
change to protected
Motivation
This break was introduced by #14648 and affected unreleased 2.11.
Modifications
overrideBrokerNicSpeedGbps
with the NIC number.Verifying this change
Make sure that the change passes the CI checks.
doc-not-needed