-
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
executor: reuse memory for parallelSortSpillHelper #53859
executor: reuse memory for parallelSortSpillHelper #53859
Conversation
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #53859 +/- ##
=================================================
- Coverage 72.6167% 55.7889% -16.8279%
=================================================
Files 1507 1627 +120
Lines 431669 602265 +170596
=================================================
+ Hits 313464 335997 +22533
- Misses 98888 243062 +144174
- Partials 19317 23206 +3889
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/retest |
/retest |
1 similar comment
/retest |
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
} | ||
} | ||
|
||
func (p *parallelSortSpillHelper) close() { | ||
for _, inDisk := range p.sortedRowsInDisk { | ||
inDisk.Close() | ||
} | ||
p.tmpSpillChunk.Destroy(spillChunkSize, p.fieldTypes) |
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.
put it in defer block?
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.
I think it is impossible to have a problem with the isDisk.Close
and lead to panic 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.
OK
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: windtalker, xzhangxian1008 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:
|
/cherrypick release-8.1 |
@hawkingrei: new pull request created to branch 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 ti-community-infra/tichi repository. |
/cherrypick release-7.5 |
@hawkingrei: new pull request created to branch 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 ti-community-infra/tichi repository. |
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
What problem does this PR solve?
Issue Number: close #53861
Problem Summary:
What changed and how does it work?
we get a profiler while we benchmark sync load. it takes too much time on the newParallelSortSpillHelper. it is unnecessary.
https://flamegraph.com/share/4dca9137-2419-11ef-ab1b-b6898751f631
Check List
Tests
after optimization
t takes less time on the newParallelSortSpillHelper
https://flamegraph.com/share/822c3df8-247d-11ef-ab1b-b6898751f631
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.