This is an automated email from the ASF dual-hosted git repository. kirs pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new ca24cd1cd97 branch-2.1 [Fix](Insert-Job)Resolving Task Status Discrepancies in Query Execution Records (#45342) (#45451) ca24cd1cd97 is described below commit ca24cd1cd97d9918f2ccdbe313398206f3d9e941 Author: Calvin Kirs <guoqi...@selectdb.com> AuthorDate: Wed Dec 18 16:49:21 2024 +0800 branch-2.1 [Fix](Insert-Job)Resolving Task Status Discrepancies in Query Execution Records (#45342) (#45451) bp #45342 --- .../java/org/apache/doris/job/extensions/insert/InsertTask.java | 2 +- regression-test/suites/job_p0/test_base_insert_job.groovy | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java index fcf0a6b33f9..91f6ebe41e5 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java +++ b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java @@ -244,7 +244,7 @@ public class InsertTask extends AbstractTask { trow.addToColumnValue(new TCell().setStringVal(String.valueOf(getJobId()))); trow.addToColumnValue(new TCell().setStringVal(jobName)); trow.addToColumnValue(new TCell().setStringVal(getJobId() + LABEL_SPLITTER + getTaskId())); - trow.addToColumnValue(new TCell().setStringVal(jobInfo.getState().name())); + trow.addToColumnValue(new TCell().setStringVal(getStatus().name())); trow.addToColumnValue(new TCell().setStringVal(getErrorMsg())); // create time trow.addToColumnValue(new TCell().setStringVal(TimeUtils.longToTimeString(getCreateTimeMs()))); diff --git a/regression-test/suites/job_p0/test_base_insert_job.groovy b/regression-test/suites/job_p0/test_base_insert_job.groovy index 90f29de3c1e..33ae28443b2 100644 --- a/regression-test/suites/job_p0/test_base_insert_job.groovy +++ b/regression-test/suites/job_p0/test_base_insert_job.groovy @@ -116,7 +116,7 @@ suite("test_base_insert_job") { def taskStatus = sql """select status from tasks("type"="insert") where JobName ='${jobName}'""" for (int i = 0; i < taskStatus.size(); i++) { - assert taskStatus.get(i).get(0) =="CANCELED" || taskStatus.get(i).get(0) =="FINISHED" + assert taskStatus.get(i).get(0) =="CANCELED" || taskStatus.get(i).get(0) =="SUCCESS" } sql """ CREATE JOB ${jobMixedName} ON SCHEDULE every 1 second DO insert into ${tableName} (timestamp, type, user_id) values ('2023-03-18','1','12213'); @@ -168,7 +168,7 @@ suite("test_base_insert_job") { // table should have one record after job finished assert datas.size() == 1 // one time job only has one task. when job finished, task status should be FINISHED - assert datas.get(0).get(0) == "FINISHED" + assert datas.get(0).get(0) == "SUCCESS" // check table data def dataCount1 = sql """select count(1) from ${tableName} where user_id=1001""" assert dataCount1.get(0).get(0) == 1 @@ -202,8 +202,6 @@ suite("test_base_insert_job") { def past_start_time_job = sql """ select status from jobs("type"="insert") where name='past_start_time'""" println past_start_time_job assert past_start_time_job.get(0).get(0) == "RUNNING" - def recurringTableDatas = sql """ select count(1) from ${tableName} where user_id=99 and type=99 """ - assert recurringTableDatas.get(0).get(0) == 1 sql """ DROP JOB IF EXISTS where jobname = 'past_start_time' """ @@ -306,7 +304,7 @@ suite("test_base_insert_job") { CREATE JOB test_error_starts ON SCHEDULE every -1 second comment 'test' DO insert into ${tableName} (timestamp, type, user_id) values ('2023-03-18','1','12213'); """ } catch (Exception e) { - //ignore + assert e.getMessage().contains("expecting INTEGER_VALUE") } // test keyword as job name --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org