Skip to content
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

Merged
merged 3 commits into from
Dec 8, 2022
Merged

[fix][broker] Fix the wrong behaviour when set overrideBrokerNicSpeedGbps #18818

merged 3 commits into from
Dec 8, 2022

Conversation

mattisonchao
Copy link
Member

@mattisonchao mattisonchao commented Dec 8, 2022

Motivation

This break was introduced by #14648 and affected unreleased 2.11.

Modifications

  • Multiply overrideBrokerNicSpeedGbps with the NIC number.

Verifying this change

  • Make sure that the change passes the CI checks.

  • doc-not-needed

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

@mattisonchao Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Dec 8, 2022
@mattisonchao mattisonchao self-assigned this Dec 8, 2022
@mattisonchao mattisonchao added this to the 2.12.0 milestone Dec 8, 2022
@mattisonchao mattisonchao added release/blocker Indicate the PR or issue that should block the release until it gets resolved release/2.11.0 ready-to-test labels Dec 8, 2022
@mattisonchao mattisonchao reopened this Dec 8, 2022
@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2022

Codecov Report

Merging #18818 (49ed68c) into master (68ca60c) will decrease coverage by 3.03%.
The diff coverage is 33.33%.

Impacted file tree graph

@@             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     
Flag Coverage Δ
unittests 47.02% <33.33%> (-3.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...r/stats/prometheus/PrometheusMetricsGenerator.java 0.00% <0.00%> (-67.40%) ⬇️
...ersistentStickyKeyDispatcherMultipleConsumers.java 58.33% <25.00%> (-4.05%) ⬇️
...ker/loadbalance/impl/LinuxBrokerHostUsageImpl.java 79.68% <100.00%> (+0.32%) ⬆️
...n/java/org/apache/pulsar/broker/admin/v3/Sink.java 0.00% <0.00%> (-100.00%) ⬇️
...java/org/apache/pulsar/broker/admin/v3/Source.java 0.00% <0.00%> (-100.00%) ⬇️
...a/org/apache/pulsar/broker/admin/v3/Functions.java 0.00% <0.00%> (-100.00%) ⬇️
...ar/broker/stats/prometheus/ManagedLedgerStats.java 0.00% <0.00%> (-100.00%) ⬇️
...oker/stats/prometheus/PrometheusMetricStreams.java 0.00% <0.00%> (-100.00%) ⬇️
.../stats/prometheus/AggregatedSubscriptionStats.java 0.00% <0.00%> (-100.00%) ⬇️
...metheus/AggregatedTransactionCoordinatorStats.java 0.00% <0.00%> (-100.00%) ⬇️
... and 127 more

@@ -121,10 +122,12 @@ public void calculateBrokerHostUsage() {
this.usage = usage;
}

private double getTotalNicLimitWithConfiguration(List<String> nics) {
@VisibleForTesting
public double getTotalNicLimitWithConfiguration(List<String> nics) {
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

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

change to protected

@Technoboy- Technoboy- merged commit 3e9994e into apache:master Dec 8, 2022
@Technoboy- Technoboy- added cherry-picked/branch-2.11 and removed release/blocker Indicate the PR or issue that should block the release until it gets resolved labels Dec 8, 2022
Demogorgon314 pushed a commit to Demogorgon314/pulsar that referenced this pull request Dec 26, 2022
Demogorgon314 pushed a commit to Demogorgon314/pulsar that referenced this pull request Dec 29, 2022
lifepuzzlefun pushed a commit to lifepuzzlefun/pulsar that referenced this pull request Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants