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 50cf33768913b..70a6313c2eaaf 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 @@ -363,8 +363,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 {