This is an automated email from the ASF dual-hosted git repository.
diwu 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 32c91fd17a2 [fix](insert) fix insert job duplicate registration
(#57572)
32c91fd17a2 is described below
commit 32c91fd17a28cf54f25aa913b2ac6efe93926bcc
Author: hui lai <[email protected]>
AuthorDate: Tue Nov 4 10:33:38 2025 +0800
[fix](insert) fix insert job duplicate registration (#57572)
### What problem does this PR solve?
Fix insert job duplicate registration.
---
.../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]