-
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
ddl: support alter table attributes to add a label rule #26511
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
48263c2
to
dc5941c
Compare
|
||
// ResetTable will reset the label rule for a table with a given ID and names. | ||
func (r *Rule) ResetTable(id int64, dbName, tableName string) *Rule { | ||
r.ID = fmt.Sprintf(TableIDFormat, IDPrefix, dbName, tableName) |
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.
Note that text ID is troublesome for rename table
, and flashback/recover
where you only get the integer. You will need history job and model out of ddl package to retrieve the name.
.
Check #20575 for gc and placement rules.
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.
Yes. And I have worked on it in the last few days.
baf2d78
to
ad5bcee
Compare
PTAL @JmPotato |
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.
bdae5e5
to
5c1e5ad
Compare
/run-check_dev_2 |
@JmPotato: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. In response to this: 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 ti-community-infra/tichi repository. |
func NewLabels(attrs []string) Labels { | ||
labels := make(Labels, 0, len(attrs)) | ||
for _, attr := range attrs { | ||
label := NewLabel(attr) |
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 valid the attributes? only supports nomerge
at present.
af5bf87
to
3f9b5c8
Compare
/run-check_dev_2 |
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
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 6ab0df62efcbad72a20335afc80bb0de1f94de8f
|
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
abeeec8
to
7e20f79
Compare
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 7e20f79
|
/run-unit-test |
1 similar comment
/run-unit-test |
@rleungx: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
/run-check_dev_2 |
What problem does this PR solve?
Closes #26692.
This PR is going to support
to add an attribute for a table.
What is changed and how it works?
What's Changed:
AlterTableAttributes
inAlterTable
.Rule
which is the same asLabelRule
defined in PDCheck List
Tests
Documentation
Release note