-
Notifications
You must be signed in to change notification settings - Fork 6k
ddl, planner: avoid running queries on the non-Public state table #55891
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #55891 +/- ##
=================================================
- Coverage 73.3374% 57.0961% -16.2414%
=================================================
Files 1638 1789 +151
Lines 453738 640626 +186888
=================================================
+ Hits 332760 365773 +33013
- Misses 100578 249754 +149176
- Partials 20400 25099 +4699
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/hold I'm doing some manual test. |
Another concern is that: when the table is in |
/retest |
/unhold |
6ad00e8
to
8a2368b
Compare
f45e8f6
to
551b811
Compare
/retest |
pkg/planner/core/preprocess.go
Outdated
@@ -1634,6 +1634,10 @@ func (p *preprocessor) handleTableName(tn *ast.TableName) { | |||
return | |||
} | |||
} | |||
if err := p.checkTableVisible(tableInfo); err != nil { |
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.
I am not sure about this modification, please ask the DDL owner to take a look.
REST LGTM.
1e665ef
to
91702c1
Compare
/retest |
/retest |
[LGTM Timeline notifier]Timeline:
|
/retest |
/test pull-br-integration-test |
@YangKeao: The specified target(s) for
Use
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 kubernetes-sigs/prow repository. |
Signed-off-by: Yang Keao <[email protected]>
Signed-off-by: Yang Keao <[email protected]>
Signed-off-by: Yang Keao <[email protected]>
Signed-off-by: Yang Keao <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, hawkingrei, tiancaiamao, winoros, wjhuang2016 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 |
What problem does this PR solve?
Issue Number: close #55813
Problem Summary:
When the table is in
WriteOnly
state (and hasn't been synchronized to other tidb instances), it'll cause inconsistency:What changed and how does it work?
Make the table invisible when it's in
WriteOnly/DeleteOnly
state. Previously, the users can see/write/delete any data for any table without considering the state. I think it's because the key range of the table is not affected by newly written things, so theDROP TABLE
always has a good behavior.In conclusion, the behavior of foreign key in
WriteOnly
(or
DeleteOnly` is that:For more detail, see #55813
This PR also modified the state from
WriteOnly
toDeleteOnly
. Both state have the same effect, but usingDeleteOnly
is more suitable considering the semantic.Check List
Tests
TODO
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.