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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to