From eea0cbec74d7a5afca0f116f0f6e7d810e3b7869 Mon Sep 17 00:00:00 2001 From: caiconghui <55968745+caiconghui@users.noreply.github.com> Date: Fri, 3 Mar 2023 19:06:39 +0800 Subject: [PATCH] [enhancement](transaction) Reduce hold writeLock time for DatabaseTransactionMgr to improve stability of stream load (#17380) Clear transaction state log occupies too much time, so we change clear transaction log level from info to debug Co-authored-by: caiconghui1 --- .../apache/doris/transaction/DatabaseTransactionMgr.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java index 5bbefce18d..ed5c0cff7f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java @@ -1383,7 +1383,9 @@ public class DatabaseTransactionMgr { dbExpiredTxnIds.put(dbId, expiredTxnIds); BatchRemoveTransactionsOperation op = new BatchRemoveTransactionsOperation(dbExpiredTxnIds); editLog.logBatchRemoveTransactions(op); - LOG.info("Remove {} expired transactions", MAX_REMOVE_TXN_PER_ROUND - leftNum); + if (LOG.isDebugEnabled()) { + LOG.debug("Remove {} expired transactions", MAX_REMOVE_TXN_PER_ROUND - leftNum); + } } } finally { writeUnlock(); @@ -1416,7 +1418,9 @@ public class DatabaseTransactionMgr { if (txnIds.isEmpty()) { labelToTxnIds.remove(transactionState.getLabel()); } - LOG.info("transaction [" + txnId + "] is expired, remove it from transaction manager"); + if (LOG.isDebugEnabled()) { + LOG.debug("transaction [" + txnId + "] is expired, remove it from transaction manager"); + } } else { // should not happen, add a warn log to observer LOG.warn("transaction state is not found when clear transaction: " + txnId);