diff --git a/fe/fe-core/src/main/java/com/starrocks/load/loadv2/InsertLoadJob.java b/fe/fe-core/src/main/java/com/starrocks/load/loadv2/InsertLoadJob.java index 7d83c0ca177f5..ade752d568033 100644 --- a/fe/fe-core/src/main/java/com/starrocks/load/loadv2/InsertLoadJob.java +++ b/fe/fe-core/src/main/java/com/starrocks/load/loadv2/InsertLoadJob.java @@ -262,4 +262,8 @@ public void readFields(DataInput in) throws IOException { public void setEstimateScanRow(long rows) { this.estimateScanRow = rows; } + + public void setTransactionId(long txnId) { + this.transactionId = txnId; + } } diff --git a/fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadMgr.java b/fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadMgr.java index 8475c12f2a057..5fc396c67fe53 100644 --- a/fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadMgr.java +++ b/fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadMgr.java @@ -231,7 +231,7 @@ public void recordFinishedOrCacnelledLoadJob(long jobId, EtlJobType jobType, Str } } - public long registerLoadJob(String label, String dbName, long tableId, EtlJobType jobType, + public long registerLoadJob(String label, String dbName, long tableId, long txnId, EtlJobType jobType, long createTimestamp, long estimateScanRows, int estimateFileNum, long estimateFileSize, TLoadJobType type, long timeout, Coordinator coordinator) @@ -248,6 +248,7 @@ public long registerLoadJob(String label, String dbName, long tableId, EtlJobTyp loadJob = new InsertLoadJob(label, db.getId(), tableId, createTimestamp, type, timeout, coordinator); loadJob.setLoadFileInfo(estimateFileNum, estimateFileSize); loadJob.setEstimateScanRow(estimateScanRows); + loadJob.setTransactionId(txnId); } else { throw new LoadException("Unknown job type [" + jobType.name() + "]"); } diff --git a/fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java b/fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java index a83f761f016ab..f420c76dc12d2 100644 --- a/fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java +++ b/fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java @@ -2049,6 +2049,7 @@ public void handleDMLStmt(ExecPlan execPlan, DmlStmt stmt) throws Exception { label, database.getFullName(), targetTable.getId(), + transactionId, EtlJobType.INSERT, createTime, estimateScanRows,