-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
disttask: subtasks rebalance during task execution #48306
Conversation
Hi @ywqzzy. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #48306 +/- ##
================================================
+ Coverage 70.9893% 72.5757% +1.5864%
================================================
Files 1368 1391 +23
Lines 404075 412255 +8180
================================================
+ Hits 286850 299197 +12347
+ Misses 97242 94193 -3049
+ Partials 19983 18865 -1118
Flags with carried forward coverage won't be shown. Click here to find out more.
|
c314142
to
17893de
Compare
/cc @tangenta |
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
[LGTM Timeline notifier]Timeline:
|
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.
rest lgtm
// When no tidb scale-in/out and averageSubtaskCnt*len(d.LiveNodes) < len(subtasks), | ||
// no need to send subtask to other nodes. | ||
// eg: tidb1 with 3 subtasks, tidb2 with 2 subtasks, subtasks are balanced now. | ||
if averageSubtaskCnt*len(d.LiveNodes) < len(subtasks) && len(d.TaskNodes) == len(d.LiveNodes) { |
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.
averageSubtaskCnt*len(d.LiveNodes) < len(subtasks)
seems to be always true?
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.
No, eg:
tidb1: 4 subtasks, tidb2: 2 subtasks, then average = 3,
average * len(liveNodes) = 6 = len(subtasks)
a48de64
to
c474988
Compare
/hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Benjamin2037, D3Hunter, tangenta The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
What problem does this PR solve?
Issue Number: ref #48795 close #47298
Problem Summary:
See issue #47298
What is changed and how it works?
RebalanceSubtasks process flow:
Behavior:
see ut in rebalance_test.go
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.