diff --git a/fe/fe-core/src/main/java/com/starrocks/transaction/DatabaseTransactionMgr.java b/fe/fe-core/src/main/java/com/starrocks/transaction/DatabaseTransactionMgr.java index 416460cc65902..e5a44215337b4 100644 --- a/fe/fe-core/src/main/java/com/starrocks/transaction/DatabaseTransactionMgr.java +++ b/fe/fe-core/src/main/java/com/starrocks/transaction/DatabaseTransactionMgr.java @@ -362,8 +362,9 @@ public void prepareTransaction(long transactionId, List tablet // after state transform transactionState.afterStateTransform(TransactionStatus.PREPARED, txnOperated, callback, null); } - - persistTxnStateInTxnLevelLock(transactionState); + if (writeEditLog) { + persistTxnStateInTxnLevelLock(transactionState); + } LOG.info("transaction:[{}] successfully prepare", transactionState); } finally {