morrySnow commented on code in PR #21849:
URL: https://github.com/apache/doris/pull/21849#discussion_r1265292459


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatisticsCacheLoader.java:
##########
@@ -67,4 +82,43 @@ private Optional<ColumnStatistic> loadFromStatsTable(long 
tableId, long idxId, S
             return Optional.of(columnStatistics);
         }
     }
+
+    private void retryLoad(StatisticsCacheKey key) {
+
+        singleThreadPool.submit(new RetryTask(key, 1));
+    }
+
+    private static class RetryTask implements Runnable {
+        StatisticsCacheKey key;
+        int retryTimes;
+
+        public RetryTask(StatisticsCacheKey key, int retryTimes) {
+            this.key = key;
+            this.retryTimes = retryTimes;
+        }
+
+        @Override
+        public void run() {
+            List<ResultRow> columnResults = null;
+            try {
+                columnResults = StatisticsRepository.loadColStats(key.tableId, 
key.idxId, key.colName);
+            } catch (InternalQueryExecutionException e) {
+                if (this.retryTimes < StatisticConstants.LOAD_RETRY_TIMES) {

Review Comment:
   what will happen if retryTimes >= LOAD_RETRY_TIMES? why not retry until load 
success or detected key aready been loaded into cache?



##########
fe/fe-core/src/main/java/org/apache/doris/common/ThreadPoolManager.java:
##########
@@ -134,6 +134,15 @@ public static ThreadPoolExecutor 
newDaemonFixedThreadPool(int numThread, int que
                 poolName, needRegisterMetric);
     }
 
+    public static ThreadPoolExecutor newDaemonFixedThreadPool(int numThread, 
int queueSize,
+                                                              String poolName, 
int timeoutSeconds,

Review Comment:
   unuse arg `timeoutSeconds` 



##########
fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatisticsCacheLoader.java:
##########
@@ -67,4 +82,43 @@ private Optional<ColumnStatistic> loadFromStatsTable(long 
tableId, long idxId, S
             return Optional.of(columnStatistics);
         }
     }
+
+    private void retryLoad(StatisticsCacheKey key) {
+

Review Comment:
   remove this blank line



-- 
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-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to