-
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
executor: some minor refine for hash join v2 build #54429
base: master
Are you sure you want to change the base?
executor: some minor refine for hash join v2 build #54429
Conversation
…or small query Signed-off-by: xufei <[email protected]>
Signed-off-by: xufei <[email protected]>
Hi @windtalker. 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. |
/assign |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #54429 +/- ##
=================================================
- Coverage 72.8354% 55.6712% -17.1643%
=================================================
Files 1535 1657 +122
Lines 435896 608187 +172291
=================================================
+ Hits 317487 338585 +21098
- Misses 98795 246295 +147500
- Partials 19614 23307 +3693
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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: XuHuaiyu, 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:
|
/retest |
@windtalker: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: ref #53127
Problem Summary:
What changed and how does it work?
During hash join v2 build, it will pre-allocate maxRowTableSegmentSize(which is 1024) rows for a new rowTableSegment
tidb/pkg/executor/join/join_row_table.go
Lines 87 to 95 in 634ac69
For small queries, it is a waste to pre allocate so many memories and may hurt the performance in high concurrency scenarios.
In this pr, when constructing a new rowTableSegment, it will use
chunk_row_number/partition_number * 1.2
as the row size hint for the first rowTableSegment, but still use maxRowTableSegmentSize as the row size hint for the following rowTableSegment.Add
maxRowTableSegmentByteSize
to control the max memory size of a rowTableSegment.Since rowTableSegment saves
rowStartOffset
directly, there is no need to save row offset inbuilder.startPosInRawData
, so removestartPosInRawData
inrowTableBuilder
rename
crrntSizeOfRowTable
torowNumberInCurrentRowTableSeg
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.