-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
table, executor: let SplitIndexValue
work with clustered index table.
#53254
Conversation
Hi @Defined2014. 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. |
/run-check-issue-triage-complete |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #53254 +/- ##
================================================
+ Coverage 72.4460% 75.0451% +2.5990%
================================================
Files 1493 1499 +6
Lines 429361 437121 +7760
================================================
+ Hits 311055 328038 +16983
+ Misses 99031 88975 -10056
- Partials 19275 20108 +833
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
@Defined2014: 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. |
/retest |
@Defined2014: 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. |
pkg/table/tables/index.go
Outdated
@@ -412,15 +412,12 @@ func (c *index) Delete(ctx table.MutateContext, txn kv.Transaction, indexedValue | |||
// Only when pid in value equals to c.physicalID, the key can be deleted. | |||
if c.idxInfo.Global { |
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.
L413~L425 are useless now, which can be deleted. ref: #52442
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.
Done, thx.
} | ||
|
||
// splitIndexValueForIndexValueVersion0 splits index value into segments. | ||
func splitIndexValueForIndexValueVersion0(value []byte) (segs IndexValueSegments) { |
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.
not get the name splitIndexValueForIndexValueVersion0
logic behind? this is a extensible index value format.
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.
See
tidb/pkg/tablecodec/tablecodec.go
Line 1408 in 2d552c0
// +-- IndexValueVersion0 (with restore data, or common handle, or index is global) |
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.
okok
|
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, with some questions:
- So the default of creating a partitioned table with a global index, will still be non-clustered?
- Should we also create a PR for supporting clustered tables for DDL, which seems to be disabled here?
/retest |
@mjonss: 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. |
The problem is we run
This line means we couldn't create an index is global and also is a clustered primary key. Because the table id of a clustered index key should equals to partition id. But if table has a clustered index and want to add an global index, it's ok. I think this line wants to make error message more cleaner. |
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
/retest |
@Defined2014: 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mjonss, zimulala 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 |
@Defined2014: 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. |
What problem does this PR solve?
Issue Number: close #49995
Problem Summary: Ref PR #50013, remove
insert on duplicate
part. /cc @L-mapleWhat changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.