-
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: determine whether to use merge sort by each index separately #52000
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/test-infra repository. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #52000 +/- ##
=================================================
- Coverage 72.3939% 54.6311% -17.7628%
=================================================
Files 1481 1592 +111
Lines 365286 608874 +243588
=================================================
+ Hits 264445 332635 +68190
- Misses 81270 253092 +171822
- Partials 19571 23147 +3576
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -1175,7 +1175,7 @@ func (do *Domain) Init( | |||
sysFac := func() (pools.Resource, error) { | |||
return sysExecutorFactory(do) | |||
} | |||
sysCtxPool := pools.NewResourcePool(sysFac, 128, 128, resourceIdleTimeout) | |||
sysCtxPool := pools.NewResourcePool(sysFac, 512, 512, resourceIdleTimeout) |
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 128 to 512 mean?
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
for i, g := range kvMetaGroups { | ||
dataFiles := make([]string, 0, 1000) |
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 not generate subtasks for each index that really needs merge sort?
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.
If we do this, in step 3, we need to scan subtasks meta from both step 2 and step 1.
/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/test-infra repository. |
/ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Benjamin2037, 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:
|
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: close #52004
Problem Summary:
Before this PR, when TiDB adds multiple indexes with global sort, merge sort step is determined by external file count of ALL indexes. For example, the threshold is 4000, there are 3 indexes with 3000 files respectively, then there are 9000(>4000) files. Merge sort step will be executed. However, merge sort is not necessary in this case, because the records from different indexes are not overlap.
What 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.