-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
dxf: add tidb_max_dist_task_nodes
to specify max node count
#58937
base: master
Are you sure you want to change the base?
Conversation
tidb_max_dist_task_nodes
to spcify node count for DXF
Hi @tangenta. 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-sigs/prow repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #58937 +/- ##
================================================
+ Coverage 73.0457% 74.7723% +1.7266%
================================================
Files 1689 1736 +47
Lines 467009 480976 +13967
================================================
+ Hits 341130 359637 +18507
+ Misses 104894 98766 -6128
- Partials 20985 22573 +1588
Flags with carried forward coverage won't be shown. Click here to find out more.
|
tidb_max_dist_task_nodes
to spcify node count for DXFtidb_max_dist_task_nodes
to specify node count for DXF
tidb_max_dist_task_nodes
to specify node count for DXFtidb_max_dist_task_nodes
to specify max node count
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
pkg/session/bootstrap.go
Outdated
return | ||
} | ||
doReentrantDDL(s, "ALTER TABLE mysql.tidb_global_task ADD COLUMN max_node_count INT AFTER `modify_params`;", infoschema.ErrColumnExists) | ||
doReentrantDDL(s, "ALTER TABLE mysql.tidb_global_task_history ADD COLUMN max_node_count INT AFTER `modify_params`;", infoschema.ErrColumnExists) |
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.
Should we specify the default value for this column?
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.
The default value should be zero or a large integer so that it does not affect the behavior of an existing task.
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.
we can specify the default value be 0, so there is no need to check nil for tasks before upgrade
[LGTM Timeline notifier]Timeline:
|
pkg/session/bootstrap.go
Outdated
return | ||
} | ||
doReentrantDDL(s, "ALTER TABLE mysql.tidb_global_task ADD COLUMN max_node_count INT AFTER `modify_params`;", infoschema.ErrColumnExists) | ||
doReentrantDDL(s, "ALTER TABLE mysql.tidb_global_task_history ADD COLUMN max_node_count INT AFTER `modify_params`;", infoschema.ErrColumnExists) |
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.
we can specify the default value be 0, so there is no need to check nil for tasks before upgrade
cafcf08
to
d47d494
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: CbcWestwolf The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
29/35
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.
after change this might incorrectly takes some node as dead:
- we have 4 nodes, in order of N1/N2.... task T have 2 subtasks, and they are scheduled to N3/N4 initially, and are running
- when N1/N2 are available, this PR will choose to use them to schedule subtasks of T, and in L163(have the log
dead node or not have enough slots, schedule subtasks away
) ofdoBalanceSubtasks
N3/N4 will be taken as dead node, and those running subtasks will be scheduled away
What problem does this PR solve?
Issue Number: close #58944
Problem Summary: See #58944
What changed and how does it work?
tidb_max_dist_task_nodes
max_node_count
tomysql.tidb_global_task
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.