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

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


The following commit(s) were added to refs/heads/master by this push:
     new cf2e0cf  [Bug] Fix export job sometimes stuck in exporting state after 
timeout (#5932)
cf2e0cf is described below

commit cf2e0cf2c884581798c300e0c9a01ad9ed05d1db
Author: xy720 <[email protected]>
AuthorDate: Sun May 30 23:09:29 2021 +0800

    [Bug] Fix export job sometimes stuck in exporting state after timeout 
(#5932)
    
    Fix #5931
    The reason is that sometime the method coordinate.exec() is not call when 
the job is timeout,
    so that the query profile in this coordinate is not be initialized,
    which will cause an NPE error in the execution of ExportExportingTask.
---
 .../src/main/java/org/apache/doris/task/ExportExportingTask.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/task/ExportExportingTask.java 
b/fe/fe-core/src/main/java/org/apache/doris/task/ExportExportingTask.java
index e8c9991..744a480 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/ExportExportingTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/ExportExportingTask.java
@@ -135,7 +135,10 @@ public class ExportExportingTask extends MasterTask {
                         DebugUtil.printId(coord.getQueryId()), job.getId(), 
progress);
             }
 
-            
coord.getQueryProfile().getCounterTotalTime().setValue(TimeUtils.getEstimatedTime(job.getStartTimeMs()));
+            RuntimeProfile queryProfile = coord.getQueryProfile();
+            if (queryProfile != null) {
+                
queryProfile.getCounterTotalTime().setValue(TimeUtils.getEstimatedTime(job.getStartTimeMs()));
+            }
             coord.endProfile();
             fragmentProfiles.add(coord.getQueryProfile());
         }
@@ -248,8 +251,7 @@ public class ExportExportingTask extends MasterTask {
 
     private void initProfile() {
         profile = new RuntimeProfile("Query");
-        RuntimeProfile summaryProfile = new RuntimeProfile("Query");
-        summaryProfile = new RuntimeProfile("Summary");
+        RuntimeProfile summaryProfile = new RuntimeProfile("Summary");
         summaryProfile.addInfoString(ProfileManager.QUERY_ID, 
String.valueOf(job.getId()));
         summaryProfile.addInfoString(ProfileManager.START_TIME, 
TimeUtils.longToTimeString(job.getStartTimeMs()));
 

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

Reply via email to