-
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: support read records with copr for adding index #39191
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
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.
Could you add a performance report in release note?
return copCtx | ||
} | ||
|
||
func (c *copContext) buildTableScan(ctx context.Context, startTS uint64, start, end kv.Key) (distsql.SelectResult, error) { |
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.
It looks very like
Line 438 in 706a646
func (dc *ddlCtx) buildDescTableScan(ctx *JobContext, startTS uint64, tbl table.PhysicalTable, |
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.
Sure, let's clean these up in another PR.
There are similar code in the following places:
(dc *ddlCtx) buildDescTableScan
(e *CheckIndexRangeExec) Open
(e *RecoverIndexExec) buildTableScan
(e *CleanupIndexExec) buildIndexScan
The performance gets a little bit worse and unstable than the previous implementation, because this PR builds & sends the coprocessor requests multiple times for the same task range. I would like to post the performance report in the next PR, which reuses the same coprocessor request and makes read and write asynchronize. |
|
/hold |
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package ddl_test |
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.
Can we create a new folder to put this test case? DDL put too much test cases in the folder.
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.
What is the problem?
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
/unhold |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: abdf626
|
TiDB MergeCI notify🔴 Bad News! [2] CI still failing after this pr merged.
|
What problem does this PR solve?
Issue Number: ref #35983
Problem Summary:
What is changed and how it works?
This PR supports using coprocessor to read the table records for adding index.
Check List
Tests
The test is covered by
realtikvtest/addindex
.Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.