This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new a18b345459 [opt](stats)update tbl stats of statistics collection after 
system statistics collection job succeeded (#21528)
a18b345459 is described below

commit a18b3454598b12b3782641cd613071f3e118a0c7
Author: AKIRA <[email protected]>
AuthorDate: Wed Jul 12 11:11:50 2023 +0800

    [opt](stats)update tbl stats of statistics collection after system 
statistics collection job succeeded (#21528)
    
    So that if FE crushed when system analyze task running, the system task for 
column could be created and running when FE recovered
---
 .../java/org/apache/doris/statistics/AnalysisManager.java    | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java 
b/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java
index fde1407c11..864fed0e86 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java
@@ -259,11 +259,6 @@ public class AnalysisManager extends Daemon implements 
Writable {
             persistAnalysisJob(jobInfo);
             analysisJobIdToTaskMap.put(jobInfo.jobId, analysisTaskInfos);
         }
-        try {
-            updateTableStats(jobInfo);
-        } catch (Throwable e) {
-            LOG.warn("Failed to update Table statistics in job: {}", 
info.toString());
-        }
 
         analysisTaskInfos.values().forEach(taskScheduler::schedule);
     }
@@ -622,6 +617,13 @@ public class AnalysisManager extends Daemon implements 
Writable {
                 logCreateAnalysisJob(job);
             } else {
                 job.state = AnalysisState.FINISHED;
+                if (job.jobType.equals(JobType.SYSTEM)) {
+                    try {
+                        updateTableStats(job);
+                    } catch (Throwable e) {
+                        LOG.warn("Failed to update Table statistics in job: 
{}", info.toString());
+                    }
+                }
                 logCreateAnalysisJob(job);
             }
             analysisJobIdToTaskMap.remove(job.jobId);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to