-
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: get latest old table ID before replace view (#53720) #55095
ddl: get latest old table ID before replace view (#53720) #55095
Conversation
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: lance6716 <[email protected]>
/cc @tangenta |
/retest |
1 similar comment
/retest |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-8.1 #55095 +/- ##
================================================
Coverage ? 71.5129%
================================================
Files ? 1465
Lines ? 425158
Branches ? 0
================================================
Hits ? 304043
Misses ? 100726
Partials ? 20389
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
/build |
/test build |
@lance6716: No presubmit jobs available for pingcap/[email protected] 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. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: D3Hunter, lance6716, 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 |
/retest |
1 similar comment
/retest |
This is an automated cherry-pick of #53720
What problem does this PR solve?
Issue Number: close #53673
Problem Summary:
When we specify
OR REPLACE
clause inCREATE VIEW
statements, if there is an old view, it will be dropped first. However, this old view ID comes from DDL job arguments:tidb/pkg/ddl/table.go
Line 311 in 35e09a2
If there are many concurrent
CREATE VIEW
DDL jobs summiting to the queue, the old view ID maybe outdated. Then we will encounter 'table doesn't exist' error:tidb/pkg/ddl/table.go
Lines 341 to 344 in 35e09a2
What changed and how does it work?
Discard the old view ID from DDL job arguments. Always get the latest old view ID.
Check List
Tests
Run the script mentioned in issue, and
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.