You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "2dmurali (via GitHub)" <gi...@apache.org> on 2025/11/18 07:20:06 UTC
[PR] Fix non-daemon threads blocking JVM shutdown in RenewableTlsUtils [pinot]
2dmurali opened a new pull request, #17221:
URL: https://github.com/apache/pinot/pull/17221
### Description
Fixes #16979
### Problem
The `RenewableTlsUtils` prevents JVM shutdown in on-demand processes (e.g., Pinot Admin commands). Background threads monitoring SSL certificates used non-daemon threads, keeping the JVM alive indefinitely after process completion, requiring manual termination.
### Fix
- Modified `NamedThreadFactory` usage in `RenewableTlsUtils` to create daemon threads by passing true as the second constructor argument
- Updated r`eloadSslFactoryWhenFileStoreChanges` and `reloadSslFactory` methods to use `NamedThreadFactory` with daemon flag enabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Fix non-daemon threads blocking JVM shutdown in RenewableTlsUtils [pinot]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #17221:
URL: https://github.com/apache/pinot/pull/17221#discussion_r2539505658
##########
pinot-common/src/main/java/org/apache/pinot/common/utils/tls/RenewableTlsUtils.java:
##########
@@ -227,8 +231,9 @@ static void enableAutoRenewalFromFileStoreForSSLFactory(SSLFactory sslFactory, S
// it was never detected and run in others. This will result in few components with
// stale certificates. In order to prevent this issue, we are adding a new scheduled
// thread which will run once a day and reload the certs.
-
- Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(() -> {
+ // Use daemon thread to allow JVM to exit when on-demand processes complete.
+ Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory(SSL_DAILY_RELOAD_THREAD_PREFIX, true))
+ .scheduleAtFixedRate(() -> {
Review Comment:
The indentation on line 236 is inconsistent with the rest of the codebase. The `.scheduleAtFixedRate` method call should align with the opening parenthesis on line 235 or use standard 4-space indentation.
```suggestion
.scheduleAtFixedRate(() -> {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Fix non-daemon threads blocking JVM shutdown in RenewableTlsUtils [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #17221:
URL: https://github.com/apache/pinot/pull/17221#issuecomment-3549494817
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/17221?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 55.90%. Comparing base ([`3224ce6`](https://app.codecov.io/gh/apache/pinot/commit/3224ce6b796489d36ae69ae592f7a4964c129ac8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`494149c`](https://app.codecov.io/gh/apache/pinot/commit/494149cd10b0be7e0ed9bc3db2b3c3c6b8e4ffa3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 23 commits behind head on master.
> :exclamation: There is a different number of reports uploaded between BASE (3224ce6) and HEAD (494149c). Click for more details.
>
> <details><summary>HEAD has 32 uploads less than BASE</summary>
>
>| Flag | BASE (3224ce6) | HEAD (494149c) |
>|------|------|------|
>|java-21|5|1|
>|unittests1|2|1|
>|unittests|4|1|
>|temurin|9|1|
>|java-11|4|0|
>|unittests2|2|0|
>|integration|5|0|
>|integration2|1|0|
>|integration1|2|0|
>|custom-integration1|2|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #17221 +/- ##
============================================
- Coverage 63.17% 55.90% -7.28%
+ Complexity 1428 701 -727
============================================
Files 3121 2435 -686
Lines 184814 136586 -48228
Branches 28332 21816 -6516
============================================
- Hits 116760 76353 -40407
+ Misses 59033 53825 -5208
+ Partials 9021 6408 -2613
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-11](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.90% <100.00%> (-7.25%)` | :arrow_down: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.90% <100.00%> (-7.28%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.90% <100.00%> (-7.28%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.90% <100.00%> (-0.05%)` | :arrow_down: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/17221/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/17221?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Fix non-daemon threads blocking JVM shutdown in RenewableTlsUtils [pinot]
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on PR #17221:
URL: https://github.com/apache/pinot/pull/17221#issuecomment-3555087266
Thanks for your contribution !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Fix non-daemon threads blocking JVM shutdown in RenewableTlsUtils [pinot]
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 merged PR #17221:
URL: https://github.com/apache/pinot/pull/17221
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org