-
Notifications
You must be signed in to change notification settings - Fork 3.7k
【Optimize】optimize host selection strategy #4914
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
【Optimize】optimize host selection strategy #4914
Conversation
| Reference<Long> backendIdRef = new Reference<Long>(); | ||
| TNetworkAddress execHostPort = SimpleScheduler.getHost(minLocation.backend_id, | ||
| scanRangeLocations.getLocations(), this.idToBackend, backendIdRef); | ||
| if (execHostPort.hostname != minLocation.server.hostname || |
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.
!execHostPort.hostname.equals(minLocation.server.hostname)
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.
Thanks for your review. I have modified it.
morningman
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.
LGTM
Introduced by apache#4914 apache#4912
Proposed changes
When a tablet selects which replica's host to execute scan operation, it takes
round-robinstrategy to load balance.minAssignedBytesis the current load of one host. If a backend is not alive momently, it will randomly take one of other replicas as the choice, but the unalive backend'sminAssignedBytesnot be descreased and the new choice'sminAssignedBytesalso not be increased. That will make the real load of the backends not corret.Types of changes
What types of changes does your code introduce to Doris?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...