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

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 791725594de branch-4.0: [fix](insert) fix insert job duplicate 
registration #57572 (#57663)
791725594de is described below

commit 791725594deffd195e7fae19e00e03c3232f105a
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Nov 5 00:47:03 2025 +0800

    branch-4.0: [fix](insert) fix insert job duplicate registration #57572 
(#57663)
    
    Cherry-picked from #57572
    
    Co-authored-by: hui lai <[email protected]>
---
 .../main/java/org/apache/doris/load/loadv2/LoadManager.java    |  2 +-
 regression-test/suites/ddl_p0/test_ctas.groovy                 |  7 -------
 .../suites/load_p0/insert/test_insert_statistic.groovy         | 10 +++++++++-
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java 
b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java
index 15936800d26..30021c5520a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java
@@ -229,8 +229,8 @@ public class LoadManager implements Writable {
                 default:
                     return;
             }
+            addLoadJob(loadJob);
         }
-        addLoadJob(loadJob);
         // persistent
         Env.getCurrentEnv().getEditLog().logCreateLoadJob(loadJob);
     }
diff --git a/regression-test/suites/ddl_p0/test_ctas.groovy 
b/regression-test/suites/ddl_p0/test_ctas.groovy
index 0bf5678e4d3..df304aeb284 100644
--- a/regression-test/suites/ddl_p0/test_ctas.groovy
+++ b/regression-test/suites/ddl_p0/test_ctas.groovy
@@ -104,13 +104,6 @@ suite("test_ctas") {
             result([[null]])
         }
 
-        res = sql """show load from ${dbname}"""
-        if (isGroupCommitMode()) {
-            assertTrue(res.size() > 4)
-        } else {
-            assertTrue(res.size() > 6)
-        }
-
         sql """
             create table if not exists test_tbl_81748325
             (
diff --git a/regression-test/suites/load_p0/insert/test_insert_statistic.groovy 
b/regression-test/suites/load_p0/insert/test_insert_statistic.groovy
index 8e55b129074..b70146d8eeb 100644
--- a/regression-test/suites/load_p0/insert/test_insert_statistic.groovy
+++ b/regression-test/suites/load_p0/insert/test_insert_statistic.groovy
@@ -42,6 +42,9 @@ suite("test_insert_statistic", "p0") {
     sql """ 
     INSERT INTO ${insert_tbl}_1 values(1, 1, 1, 1)
     """
+    sql """ 
+    INSERT INTO ${insert_tbl}_1 values(1, 1, 1, 1)
+    """
     def result = sql "SHOW LOAD FROM ${dbName}"
     log.info("result size: " + result.size())
     assertEquals(result.size(), 0)
@@ -78,7 +81,9 @@ suite("test_insert_statistic", "p0") {
     result = sql "SHOW LOAD FROM ${dbName}"
     logger.info("JobDetails: " + result[0][14])
     def json = parseJson(result[0][14])
-    assertEquals(json.ScannedRows, 2)
+    assertEquals(json.ScannedRows, 3)
+    assertEquals(json.FileNumber, 0)
+    assertEquals(json.FileSize, 0)
     assertTrue(json.LoadBytes > 0)
 
     // insert into s3 tvf
@@ -116,5 +121,8 @@ suite("test_insert_statistic", "p0") {
     logger.info("JobDetails: " + result[1][14])
     json = parseJson(result[1][14])
     assertEquals(json.ScannedRows, 2)
+    assertEquals(json.FileNumber, 1)
+    assertEquals(json.FileSize, 86)
+    assertEquals(result.size(), 2)
     assertTrue(json.LoadBytes > 0)
 }
\ No newline at end of file


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

Reply via email to