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
[LoadBalance] Optimize find nics process. #14340
[LoadBalance] Optimize find nics process. #14340
Conversation
/pulsarbot rerun-failure-checks |
...broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java
Outdated
Show resolved
Hide resolved
Could you help review this patch, for we're not sure about it. |
Supplementary Instructions: Linux
|
/pulsarbot rerun-failure-checks |
Should it be cherry-picked to other active branches? @codelipenghui I also found this problem in EC2 VMs. |
@BewareMyPower - it might be helpful to cherry pick to active branches. In #14537, there was a discussion about failing fast, instead of constantly logging this error message. #14537 (comment) I expect that behavior will likely get cherry-picked, and that commit might rely on this one. |
We had same problem on Xen VM with pulsar |
(cherry picked from commit 77d60b3)
(cherry picked from commit 77d60b3)
(cherry picked from commit 77d60b3)
Motivation
According to this PR #14252,
We can know In some cases, VMs in EC2 won't have the speed reported on the NIC and will give a read error.
In a normal case, only eth0 has
speed
value. other devices have nospeed
value.So when we check
isPhysicalNic
, line 232 would get a read error many times.pulsar/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java
Lines 229 to 247 in d3848e2
Then I think we can change the process to check type first and then to check speed.
Modifications
loadBalancerOverrideBrokerNicSpeedGbps
when we can't read speed that is ethernet.Verifying this change
Documentation
no-need-doc