[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 <caiconghui1@jd.com>
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user