-
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
server: fix memtracker leak with cursor (#44257) | tidb-test=pr/2135 #44825
server: fix memtracker leak with cursor (#44257) | tidb-test=pr/2135 #44825
Conversation
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
78ccceb
to
8f1296f
Compare
8f1296f
to
c7a69b4
Compare
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
@YangKeao: adding LGTM is restricted to approvers and reviewers in OWNERS files. 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. |
@XuHuaiyu: adding LGTM is restricted to approvers and reviewers in OWNERS files. 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. |
/retest |
/retest |
/merge |
/approve |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wshwsh12, XuHuaiyu, YangKeao The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherry-pick release-6.1 |
@YangKeao: 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. |
This is an automated cherry-pick of #44257
What problem does this PR solve?
Issue Number: close #44254
Problem Summary:
What is changed and how it works?
Detach the
memTracker
if theresultSet
anderr
are both not empty. Consider the four situations:resultSet == nil && err == nil
. It will be detached in the defer ofhandleNoDelay
directly.resultSet != nil && err == nil
. It will be detached when theresultSet
is closed.resultSet == nil && err != nil
. This PR fixes this situations It will be detached right before returning the error.resultSet != nil && err != nil
. This PR fixes this situations It will be detached when theresultSet
is closed.Check List
Tests
Release note