-
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
parser: support pre-split global index add special comment support for pre_split index option #58408
parser: support pre-split global index add special comment support for pre_split index option #58408
Conversation
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 #58408 +/- ##
================================================
+ Coverage 73.1670% 74.9054% +1.7384%
================================================
Files 1680 1726 +46
Lines 463042 474904 +11862
================================================
+ Hits 338794 355729 +16935
+ Misses 103444 96909 -6535
- Partials 20804 22266 +1462
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/approve |
/retest |
@tangenta: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
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
tk.MustExec("create table t (a int, b int) partition by range (b)" + | ||
" (partition p0 values less than (10), " + | ||
" partition p1 values less than (maxvalue));") | ||
tk.MustExec("alter table t add unique index p_a (a) global pre_split_regions = (by (5), (15));") |
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.
maybe use comments to specify the option to check that it works
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.
pkg/ddl/index_presplit.go
Outdated
@@ -120,6 +118,17 @@ func getSplitIdxKeysFromValueList( | |||
return getSplitIdxPhysicalKeysFromValueList(sctx, tblInfo, idxInfo, tblInfo.ID, byRows, destKeys) | |||
} | |||
|
|||
if idxInfo.Global { | |||
var idxTblID int64 | |||
if pi.NewTableID != 0 && idxInfo.State != model.StatePublic { |
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.
Please add comment for this
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.
This is used in reorg partition. Since we don't support pre_split option in reorg partition, let's remove this.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: D3Hunter, tangenta, 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 |
[LGTM Timeline notifier]Timeline:
|
@tangenta: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: ref #57552, ref #57551
Problem Summary:
Wrap the pre_split index option with the special comment to avoid TiCDC failing to sync downstream.
What changed and how does it work?
See code changes.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.