diff --git a/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java b/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java index 24d92849b4..928fa78550 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java @@ -347,8 +347,11 @@ public class GlobalTransactionMgr implements Writable { // for http cancel stream load api public void abortTransaction(Long dbId, String label, String reason) throws UserException { - DatabaseTransactionMgr dbTransactionMgr = getDatabaseTransactionMgr(dbId); - dbTransactionMgr.abortTransaction(label, reason); + Long txnId = getTransactionId(dbId, label); + if (txnId == null) { + throw new AnalysisException("txn with label " + label + " does not exist"); + } + abortTransaction(dbId, txnId, reason); } public void abortTransaction2PC(Long dbId, long transactionId, List tableList) throws UserException {