-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker]avoid the bestBroker choice broker exceed candidates when selectBroker in LeastResourceUsageWithWeight #16743
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
Conversation
shibd
left a comment
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.
Nice catch! Could you add a unit test to protect this change?
+1 Please add test to avoid regression. |
|
Nice catch. +1 |
@codelipenghui @shibd add unit test,PTAL~ |
Demogorgon314
left a comment
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.
Nice catch! LGTM.
...er/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java
Outdated
Show resolved
Hide resolved
f730f3f to
fb9762b
Compare
fb9762b to
e6d53fa
Compare
|
/pulsarbot run-failure-checks |
…n selectBroker in LeastResourceUsageWithWeight (apache#16743) * avoid the bestBroker exceed candidates when selectBroker * add some unit test. * improve the restart broker can load bundle as one of the best brokers Co-authored-by: nicklixinyang <nicklixinyang@didiglobal.com>
|
Removed the release/2.10.2 and release/2.9.4 labels since we don't have LeastResourceUsageWithWeight on branch-2.10 and branch-2.9 |
…n selectBroker in LeastResourceUsageWithWeight (apache#16743) * avoid the bestBroker exceed candidates when selectBroker * add some unit test. * improve the restart broker can load bundle as one of the best brokers Co-authored-by: nicklixinyang <nicklixinyang@didiglobal.com> (cherry picked from commit 0c1b3de)
Motivation
Avoid the bestBroker choice broker exceed candidates when selectBroker in LeastResourceUsageWithWeight.
When loadManager leader running a period of time,
brokerAvgResourceUsageWithWeightwill contain almost all brokers, the judge will cause we selected broker exceed candidates, it's out of expectation.Modifications
candidatescontain the broker before add the broker tobestBrokers.Documentation
doc-not-needed(Please explain why)