-
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][loadbalance] Fix wrong unit of NIC speed on linux #15304
[fix][loadbalance] Fix wrong unit of NIC speed on linux #15304
Conversation
@gaozhangmin:Thanks for your contribution. For this PR, do we need to update docs? |
@gaozhangmin:Thanks for providing doc info! |
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtils.java
Outdated
Show resolved
Hide resolved
874822d
to
499c560
Compare
@mattisonchao PTAL |
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. I left a comment that is unrelated to this PR's changes.
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtils.java
Outdated
Show resolved
Hide resolved
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, would you mind to push new PR to fix another branch? branch-2.8, branch-2.9, branch-2.10?
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
Not in the scope of this PR, but related, see #15322 |
Hi, @gaozhangmin This PR looks could not cherry-pick to branch-2.9, could you mind pushing the new PR to branch-2.9? |
Hi, @gaozhangmin This PR looks could not cherry-pick to branch-2.10, could you mind pushing the new PR to branch-2.10? |
@gaozhangmin Could you migrate this PR to branch-2.8? |
I will cherry-pick #15770 instead. |
Fixes #15229
Motivation
conversion of NIC bandwidth and tx_bytes rx_bytes is wrong on linux platform.
Modifications
For NIC bandwidth:
1,000 bit/s = 1 kbit/s (one thousand bits per second)
For tx_bytes and rx_bytes, the unit should same with NICLimit , so it should be bytes*8/1000=kbit rather than 8/1024.
Documentation
Check the box below or label this PR directly.
Need to update docs?
doc-required
(Your PR needs to update docs and you will update later)
no-need-doc
(Please explain why)
doc
(Your PR contains doc changes)
doc-added
(Docs have been already added)
doc-not-needed