[improvement](transaction) print txn edit log cost time #24501
This commit is contained in:
@ -1504,10 +1504,18 @@ public class EditLog {
|
||||
|
||||
// for TransactionState
|
||||
public void logInsertTransactionState(TransactionState transactionState) {
|
||||
long start = System.currentTimeMillis();
|
||||
long logId = logEdit(OperationType.OP_UPSERT_TRANSACTION_STATE, transactionState);
|
||||
long logEditEnd = System.currentTimeMillis();
|
||||
long end = logEditEnd;
|
||||
if (transactionState.getTransactionStatus() == TransactionStatus.VISIBLE) {
|
||||
UpsertRecord record = new UpsertRecord(logId, transactionState);
|
||||
Env.getCurrentEnv().getBinlogManager().addUpsertRecord(record);
|
||||
end = System.currentTimeMillis();
|
||||
}
|
||||
if (end - start > Config.lock_reporting_threshold_ms) {
|
||||
LOG.warn("edit log insert transaction take a lot time, write bdb {} ms, write binlog {} ms",
|
||||
logEditEnd - start, end - logEditEnd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user