This is an automated email from the ASF dual-hosted git repository. dataroaring 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 3bb3c36b9b [bugfix](txn) return when txn state is null when doing abort txn (#18045) 3bb3c36b9b is described below commit 3bb3c36b9b292b8b23e66316dcd8bc6dd92e8343 Author: AlexYue <yj976240...@gmail.com> 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 e32c24e373..25c22786d0 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: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org