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

[Feature] RandomLoadBalance some questions #14980

Open
4 tasks done
bigprincipalkk opened this issue Dec 10, 2024 · 2 comments
Open
4 tasks done

[Feature] RandomLoadBalance some questions #14980

bigprincipalkk opened this issue Dec 10, 2024 · 2 comments
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage

Comments

@bigprincipalkk
Copy link

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Apache Dubbo Component

Java SDK (apache/dubbo)

Descriptions

There are two questions about RandomLoadBalance:

  1. Why choose 4 as the critical value for switching binary search
  2. In the else branch, it should handle nodes with a weight of 0, but where does it ensure that i does not exceed the boundary
image

Related issues

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

@bigprincipalkk bigprincipalkk added component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage labels Dec 10, 2024
@bigprincipalkk
Copy link
Author

I understand, it should be the binary search method of Arrays that ensures that the last element will not be retrieved

@AlbumenJ
Copy link
Member

Node with 0 weight should be ignored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage
Projects
Status: Todo
Development

No branches or pull requests

2 participants