-
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
privilege: reuse chunk in loadTable function #59821
Conversation
Hi @tiancaiamao. 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #59821 +/- ##
================================================
+ Coverage 72.9760% 73.7946% +0.8186%
================================================
Files 1699 1703 +4
Lines 469387 476571 +7184
================================================
+ Hits 342540 351684 +9144
+ Misses 105739 103630 -2109
- Partials 21108 21257 +149
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
/retest |
@tiancaiamao: 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CbcWestwolf, lcwangchao 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:
|
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
In response to a cherrypick label: new pull request created to branch |
What problem does this PR solve?
Issue Number: ref #55563
Problem Summary:
What changed and how does it work?
chunk.Renew
cause more allocations and wastes memory, change the code fromchunk.Renew
toreq.GrowAndReset(1024)
strings.Clone
is required in decodeTableRow functions.Check List
Tests
Modify the code to call
LoadSomeUsers
manually, the database have 2M users and load 1/10 of them.Compare the memory usage before vs after:

And compare the heap alloc_space before vs after:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.