This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit 7e0ccd39d2e6ea008cfbdecbed023dc7cf1caff7 Author: AlexYue <[email protected]> AuthorDate: Thu Mar 23 20:51:21 2023 +0800 [bugfix](txn) return when txn state is null when doing abort txn (#18045) --- .../main/java/org/apache/doris/transaction/GlobalTransactionMgr.java | 4 ++++ 1 file changed, 4 insertions(+) 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 bcd91383e3..cb647ad1ef 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 @@ -299,6 +299,10 @@ public class GlobalTransactionMgr implements Writable { public void abortTransaction(long dbId, long transactionId, String reason) throws UserException { Database db = Env.getCurrentInternalCatalog().getDbNullable(dbId); TransactionState transactionState = getDatabaseTransactionMgr(dbId).getTransactionState(transactionId); + if (transactionState == null) { + LOG.info("try to cancel one txn which has no txn state. txn id: {}.", transactionId); + return; + } List<Table> tableList = db.getTablesOnIdOrderIfExist(transactionState.getTableIdList()); abortTransaction(dbId, transactionId, reason, null, tableList); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
