Skip to content
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

http/client, test: remove IgnoreTopFunction of go leak and repair http SDK leak #7749

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Jan 23, 2024

What problem does this PR solve?

Issue Number: Close #7750

What is changed and how does it work?

remove goleak.IgnoreTopFunction("internal/poll.runtime_pollWait")

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

Release note

None.

Copy link
Contributor

ti-chi-bot bot commented Jan 23, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CabinfeverB
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

Copy link
Contributor

ti-chi-bot bot commented Jan 23, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. labels Jan 23, 2024
@ti-chi-bot ti-chi-bot bot requested review from JmPotato and lhy1024 January 23, 2024 10:07
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 23, 2024
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Merging #7749 (d7b0c25) into master (b27b1e9) will decrease coverage by 3.90%.
Report is 1 commits behind head on master.
The diff coverage is 71.42%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7749      +/-   ##
==========================================
- Coverage   73.87%   69.98%   -3.90%     
==========================================
  Files         430      430              
  Lines       47630    47637       +7     
==========================================
- Hits        35188    33338    -1850     
- Misses       9454    11538    +2084     
+ Partials     2988     2761     -227     
Flag Coverage Δ
unittests 69.98% <71.42%> (-3.90%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@HuSharp HuSharp force-pushed the fix_pd_sd_close branch 2 times, most recently from fbbeddb to 1f20d47 Compare January 23, 2024 13:09
@HuSharp HuSharp changed the title [drafr] discovery: fix leak http/client, test: remove IgnoreTopFunction of go leak and repair http SDK leak Jan 23, 2024
@HuSharp HuSharp marked this pull request as ready for review January 23, 2024 13:20
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 23, 2024
@HuSharp
Copy link
Member Author

HuSharp commented Jan 23, 2024

/check-issue-triage-complete

Signed-off-by: husharp <jinhao.hu@pingcap.com>
Comment on lines 315 to 318
// only close the service discovery if it's created by the client.
if c.defaultSD && c.inner.sd != nil {
c.inner.sd.Close()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about wrapping the defaultSD into the inner client and providing a method to close sd if necessary?

Copy link
Member Author

@HuSharp HuSharp Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved defaultSD into inner
I don't think it seems necessary to provide a function

  • For default creation, there is no need for user to care about close sd
  • For incoming sd creation, it should be left to the higher level to do the closing.

Signed-off-by: husharp <jinhao.hu@pingcap.com>
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 24, 2024
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 24, 2024
@HuSharp
Copy link
Member Author

HuSharp commented Jan 24, 2024

/merge

Copy link
Contributor

ti-chi-bot bot commented Jan 24, 2024

@HuSharp: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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.

Copy link
Contributor

ti-chi-bot bot commented Jan 24, 2024

This pull request has been accepted and is ready to merge.

Commit hash: d7b0c25

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 24, 2024
@ti-chi-bot ti-chi-bot bot merged commit 9c1035d into tikv:master Jan 24, 2024
23 of 26 checks passed
@HuSharp HuSharp deleted the fix_pd_sd_close branch January 24, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

go leak in pd http client and some tests
4 participants