-
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
ttl: fix potential go leak for ttl in test #46953
Conversation
Co-authored-by: Weizhen Wang <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hawkingrei, YangKeao 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:
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #46953 +/- ##
================================================
- Coverage 73.2870% 72.8363% -0.4507%
================================================
Files 1331 1352 +21
Lines 397358 407243 +9885
================================================
+ Hits 291212 296621 +5409
- Misses 87541 92048 +4507
+ Partials 18605 18574 -31
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test all |
/retest |
2 similar comments
/retest |
/retest |
What problem does this PR solve?
Issue Number: close #46948
What is changed and how it works?
In the previous code, the ttlJobManager is created and started in a background goroutine:
tidb/domain/domain.go
Lines 2917 to 2929 in a7e3176
It has a probability that if a test runs very fast and
domain.Close
will be called beforedo.ttlJobManager.Store(ttlJobManager)
. The ttlJobManager will not stop anymore.In this PR, we just move ttlJobManager's create and start out of the goroutine.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.