-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
*: remove call of SchemaTableInfos for CheckPlacementPolicy #55679
Conversation
Hi @joechenrh. 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 #55679 +/- ##
=================================================
- Coverage 74.9564% 57.5949% -17.3615%
=================================================
Files 1580 1710 +130
Lines 367276 626154 +258878
=================================================
+ Hits 275297 360633 +85336
- Misses 72206 241593 +169387
- Partials 19773 23928 +4155
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/ok-to-test |
/retest-required |
} | ||
for _, tblInfo := range tblInfos { | ||
schemaTables := is.ListTablesWithSpecialAttribute(infoschema.AllPlacementPolicyAttribute) | ||
for _, schemaTable := range schemaTables { |
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 filter with dbInfo.Name
here?
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.
Here just retrieve and check all tables with necessary attributes, so it's seperated from the previous loop which checks policy at schema level.
/retest-required |
[LGTM Timeline notifier]Timeline:
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Benjamin2037, CbcWestwolf, tangenta, tiancaiamao 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 |
It seems no unit test added in this pr, please update the Check List in description |
What problem does this PR solve?
Issue Number: ref #55394
Problem Summary:
What changed and how does it work?
Replace
SchemaTableInfos
withListTablesWithSpecialAttribute
to get table infos.Currently,
CheckPlacementPolicyNotInUseFromInfoSchema
will fetch table infos from meta, which makes it no different fromCheckPlacementPolicyNotInUseFromMeta
.tidb/pkg/ddl/placement_policy.go
Lines 347 to 362 in 87244ed
Additionally, a new function
GetTableInfoWithAttributes
is added to meta module to retrieve tables with special attributes under certain db.Check List
Tests
Test using the following SQLs:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.