You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/11/20 15:55:36 UTC

[GitHub] [doris] englefly commented on a diff in pull request #14370: [feature-wip](planner) Update cache when analysis job finished

englefly commented on code in PR #14370:
URL: https://github.com/apache/doris/pull/14370#discussion_r1027311388


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchemaInitializer.java:
##########
@@ -46,20 +44,26 @@
 import java.util.List;
 import java.util.Map;
 
-public class StatisticStorageInitializer extends Thread {
+public class InternalSchemaInitializer extends Thread {
 
-    private static final Logger LOG = LogManager.getLogger(StatisticStorageInitializer.class);
+    private static final Logger LOG = LogManager.getLogger(InternalSchemaInitializer.class);
 
     public static boolean forTest = false;
 
+    /**
+     * If internal table creation failed, will retry after below seconds.
+     */
+    public static final int TABLE_CREATION_RETRY_INTERVAL_IN_SECONDS = 5;
+
+
     public void run() {
-        if (forTest) {
+        if (forTest || (!Env.getCurrentEnv().isMaster() && Env.getCurrentEnv().isReady())) {

Review Comment:
   `forTest` means for ut or regression?



##########
fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatistic.java:
##########
@@ -110,6 +110,8 @@ public static ColumnStatistic fromResultRow(ResultRow resultRow) {
             columnStatisticBuilder.setNumNulls(Double.parseDouble(resultRow.getColumnValue("null_count")));
             columnStatisticBuilder.setDataSize(Double
                     .parseDouble(resultRow.getColumnValue("data_size_in_bytes")));
+            columnStatisticBuilder.setAvgSizeByte(columnStatisticBuilder.getDataSize()

Review Comment:
   if there are some rows to be deleted or rows need to be merged, the AvgSizeByte may becomes larger, is that right?



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchemaInitializer.java:
##########
@@ -46,20 +44,26 @@
 import java.util.List;
 import java.util.Map;
 
-public class StatisticStorageInitializer extends Thread {
+public class InternalSchemaInitializer extends Thread {
 
-    private static final Logger LOG = LogManager.getLogger(StatisticStorageInitializer.class);
+    private static final Logger LOG = LogManager.getLogger(InternalSchemaInitializer.class);
 
     public static boolean forTest = false;
 
+    /**
+     * If internal table creation failed, will retry after below seconds.
+     */
+    public static final int TABLE_CREATION_RETRY_INTERVAL_IN_SECONDS = 5;
+
+
     public void run() {
-        if (forTest) {
+        if (forTest || (!Env.getCurrentEnv().isMaster() && Env.getCurrentEnv().isReady())) {

Review Comment:
   how about if it is master, but its env is not ready?



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

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


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