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


##########
phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java:
##########
@@ -216,6 +216,7 @@ public class QueryServicesOptions {
     public static final boolean DEFAULT_INDEX_FAILURE_THROW_EXCEPTION = true;
     public static final long DEFAULT_INDEX_FAILURE_HANDLING_REBUILD_INTERVAL = 
60000; // 60 secs
     public static final long DEFAULT_INDEX_REBUILD_TASK_INITIAL_DELAY = 10000; 
// 10 secs
+    public static final long DEFAULT_INDEX_START_TRUNCATE_TASK_DELAY = 20000; 
// 20 secs

Review Comment:
   same here



##########
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataRegionObserver.java:
##########
@@ -109,13 +112,16 @@ public class MetaDataRegionObserver implements 
RegionObserver,RegionCoprocessor
             QueryConstants.SYSTEM_SCHEMA_NAME_BYTES,
             PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE_BYTES);
     protected ScheduledThreadPoolExecutor executor = new 
ScheduledThreadPoolExecutor(1);
+    private ScheduledThreadPoolExecutor truncateTaskExectuor = new 
ScheduledThreadPoolExecutor(1,
+            new 
ThreadFactoryBuilder().setDaemon(true).setNameFormat("task-truncated%s").build());

Review Comment:
   nit: `task-truncated-%d`



##########
phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java:
##########
@@ -158,6 +158,7 @@ public interface QueryServices extends SQLCloseable {
     public static final String INDEX_FAILURE_HANDLING_REBUILD_INTERVAL_ATTRIB =
         "phoenix.index.failure.handling.rebuild.interval";
     public static final String INDEX_REBUILD_TASK_INITIAL_DELAY = 
"phoenix.index.rebuild.task.initial.delay";
+    public static final String INDEX_START_TRUNCATE_TASK_DELAY = 
"phoenix.index.start.truncate.task.delay";

Review Comment:
   stats truncate is not related to index, so let's remove "index" from configs 
everywhere



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