tkhurana commented on code in PR #1735:
URL: https://github.com/apache/phoenix/pull/1735#discussion_r1396180331


##########
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataRegionObserver.java:
##########
@@ -202,9 +212,11 @@ public Void run() throws Exception {
                 }
             }
         };
-        Thread t = new Thread(r);
-        t.setDaemon(true);
-        t.start();
+
+        if (env.getConfiguration()
+                .getBoolean(STATS_COLLECTION_ENABLED, 
DEFAULT_STATS_COLLECTION_ENABLED)) {
+            truncateTaskExectuor.schedule(r, statsTruncateTaskDelay, 
TimeUnit.MILLISECONDS);
+        }

Review Comment:
   Add an else clause and then you can add a log there "Stats collection is 
disabled"



-- 
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