-
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
executor: recover panic in executor.Close() #49222
Conversation
Hi @wshwsh12. 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/test-infra repository. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #49222 +/- ##
================================================
+ Coverage 71.0515% 71.8908% +0.8392%
================================================
Files 1368 1412 +44
Lines 401638 414171 +12533
================================================
+ Hits 285370 297751 +12381
- Misses 96426 97620 +1194
+ Partials 19842 18800 -1042
Flags with carried forward coverage won't be shown. Click here to find out more.
|
err := tk.ExecToErr(sql) | ||
require.NotNil(t, err) | ||
require.Equal(t, "[executor:8175]Your query has been cancelled due to exceeding the allowed memory limit for a single SQL query. Please try narrowing your query scope or increase the tidb_mem_quota_query limit and try again.[conn=%d]", err.Error()) | ||
tk.MustExec(sql) // No deadlock |
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.
Why change this?
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.
The error occurs in the Close() function, we should only log it and don't return to client.
/ok-to-test |
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: AilinKid, XuHuaiyu 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 |
/retest |
What problem does this PR solve?
Issue Number: close #49223
Problem Summary:
Prevent potential goroutine leaks.
In UnionExec.Close(), if there is a panic during closing the first child executor, the second executor will not closed.
And the same is true in BaseExecutor.Close().
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.