You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/11/16 08:03:34 UTC
[GitHub] [phoenix] stoty commented on a change in pull request #1351: PHOENIX-6592 PhoenixStatsCacheLoader uses non-deamon threads
stoty commented on a change in pull request #1351:
URL: https://github.com/apache/phoenix/pull/1351#discussion_r750003787
##########
File path: phoenix-core/src/main/java/org/apache/phoenix/query/PhoenixStatsCacheLoader.java
##########
@@ -43,15 +46,20 @@
public PhoenixStatsCacheLoader(PhoenixStatsLoader statsLoader, Configuration config) {
this.statsLoader = statsLoader;
- if (this.executor == null) {
+ if (executor == null) {
synchronized (PhoenixStatsCacheLoader.class) {
- if (this.executor == null) {
+ if (executor == null) {
// The size of the thread pool used for refreshing cached table stats
final int statsCacheThreadPoolSize = config.getInt(
QueryServices.STATS_CACHE_THREAD_POOL_SIZE,
QueryServicesOptions.DEFAULT_STATS_CACHE_THREAD_POOL_SIZE);
-
- this.executor = Executors.newFixedThreadPool(statsCacheThreadPoolSize);
+ final ThreadFactory threadFactory =
+ new ThreadFactoryBuilder()
+ .setDaemon(true)
+ .setNameFormat("PHOENIX-STATS-CACHE-LOADER" + "-thread-%s")
Review comment:
Because that's how it was in the method that I copy-pasted this from :)
I'm going to fix it before commit.
--
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: issues-unsubscribe@phoenix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org