-
Notifications
You must be signed in to change notification settings - Fork 922
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
[KYUUBI #6843] Fix 'query-timeout-thread' thread leak #6844
Conversation
Please fix the failed checks. |
@ASiegeLion please write the PR description seriously, and revert unnecessary code changes. |
ok |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6844 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 687 687
Lines 42463 42467 +4
Branches 5796 5796
======================================
- Misses 42463 42467 +4 ☔ View full report in Codecov by Sentry. |
We also fixed this issue a few months ago. cc @lsm1 |
@ASiegeLion In other engines, there might be the same issue. Please fix it. |
### Why are the changes needed? see #6843 If the session manager's ThreadPoolExecutor refuses to execute asyncOperation, then we need to shut down the query-timeout-thread in the catch ### How was this patch tested? 1 Use jstack to view threads on the long-lived engine side ![image](https://github.com/user-attachments/assets/95d3a897-001d-4250-bf13-172b6997021b) 2 Wait for all SQL statements in the engine to finish executing, and then use stack to check the number of query-timeout-thread threads, which should be empty. ![image](https://github.com/user-attachments/assets/0afbc026-7dd3-4594-afd2-92a5ef23f6cb) ### Was this patch authored or co-authored using generative AI tooling? NO Closes #6844 from ASiegeLion/master. Closes #6843 9107a30 [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak 4b3417f [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak ef1f66b [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak 9e1a015 [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak 78a9fde [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak Authored-by: liupeiyue <[email protected]> Signed-off-by: Cheng Pan <[email protected]> (cherry picked from commit a051253) Signed-off-by: Cheng Pan <[email protected]>
### Why are the changes needed? see #6843 If the session manager's ThreadPoolExecutor refuses to execute asyncOperation, then we need to shut down the query-timeout-thread in the catch ### How was this patch tested? 1 Use jstack to view threads on the long-lived engine side ![image](https://github.com/user-attachments/assets/95d3a897-001d-4250-bf13-172b6997021b) 2 Wait for all SQL statements in the engine to finish executing, and then use stack to check the number of query-timeout-thread threads, which should be empty. ![image](https://github.com/user-attachments/assets/0afbc026-7dd3-4594-afd2-92a5ef23f6cb) ### Was this patch authored or co-authored using generative AI tooling? NO Closes #6844 from ASiegeLion/master. Closes #6843 9107a30 [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak 4b3417f [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak ef1f66b [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak 9e1a015 [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak 78a9fde [liupeiyue] [KYUUBI #6843] FIX 'query-timeout-thread' thread leak Authored-by: liupeiyue <[email protected]> Signed-off-by: Cheng Pan <[email protected]> (cherry picked from commit a051253) Signed-off-by: Cheng Pan <[email protected]>
Seems the contributor is slient a while, let me merge this, and @lsm1 could you please send a followup to cover the rest? |
Merged to 1.11.0/1.10.2/1.9.4 |
Why are the changes needed?
see #6843
If the session manager's ThreadPoolExecutor refuses to execute asyncOperation, then we need to shut down the query-timeout-thread in the catch
How was this patch tested?
1 Use jstack to view threads on the long-lived engine side
2 Wait for all SQL statements in the engine to finish executing, and then use stack to check the number of query-timeout-thread threads, which should be empty.
Was this patch authored or co-authored using generative AI tooling?
NO