-
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
ddl: args v2 for add/drop/rename index, include PK/vector-index #56130
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 #56130 +/- ##
=================================================
- Coverage 73.2357% 57.5172% -15.7186%
=================================================
Files 1626 1778 +152
Lines 448692 645899 +197207
=================================================
+ Hits 328603 371503 +42900
- Misses 99977 249121 +149144
- Partials 20112 25275 +5163
Flags with carried forward coverage won't be shown. Click here to find out more.
|
803f379
to
dc1642c
Compare
please fix conflicts |
/test pull-unit-test-ddlv1 |
@joechenrh: 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 |
/test pull-unit-test-ddlv1 |
@joechenrh: 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. |
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
pkg/meta/model/job_args.go
Outdated
IndexArgs []*IndexArg `json:"index_args,omitempty"` | ||
|
||
// Belows are used for finished args. | ||
// For dropping index, len(IndexIDs) is 1. | ||
// While during rolling back add indexes, IndexIDs stores the partition IDs of the corresponding table. |
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.
too bad 🙃
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.
too bad 🙃
You mean the comment, or this field? 🤔
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 I need to rename these two fields. They are confusing indeed.
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.
IndexIDs stores the partition IDs of the corresponding table.
I mean this.
Maybe I need to rename these two fields. They are confusing indeed.
if the change is large, you can write a TODO and do it in other pr, this one too large
ifExists := make([]bool, 1) | ||
isGlobal := make([]bool, 0, 1) | ||
var partitionIDs []int64 | ||
if err := job.DecodeArgs(&allIndexIDs[0], &ifExists[0], &partitionIDs); 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.
The first decode is useless, since the first two elements are slice after #47135.
So in the new logic, we only decode them using slice.
pkg/meta/model/job_args.go
Outdated
isVector := false | ||
|
||
// See getFinishedArgsV1 for why we may need to decode twice. | ||
if err := job.DecodeArgs(&indexNames, &ifExists, &indexIDs, &isVector); 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.
Why isn't partitionIDs
field 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.
The partitionIDs
are stored in IndexIDs
fields for rolling back add index/primary key currently.
And I plan to change this confusing code in another pr. 😢
Updated
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.
/hold
feel free to unhold after check my comments
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: D3Hunter, lance6716, Leavrth 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 |
/test pull-unit-test-ddlv1 |
@joechenrh: 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. |
/unhold |
/retest |
What problem does this PR solve?
Issue Number: ref #53930
Problem Summary:
What changed and how does it work?
As title.
Most part of this PR is to make the arguments compatible with V1.
Below lists the layout of arguments used in V1, which may help to read this PR:
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.