chore: log long tx backtrace on a new line (#6419)

This commit is contained in:
DaniPopes
2024-02-05 21:57:20 +02:00
committed by GitHub
parent 8ef88105ae
commit 32460a183a

View File

@ -208,13 +208,11 @@ impl<K: TransactionKind> MetricsHandler<K> {
let open_duration = self.start.elapsed();
if open_duration > LONG_TRANSACTION_DURATION {
self.backtrace_recorded.store(true, Ordering::Relaxed);
let backtrace = Backtrace::force_capture();
warn!(
target: "storage::db::mdbx",
?open_duration,
%self.txn_id,
"The database read transaction has been open for too long. Backtrace: {}", backtrace.to_string()
"The database read transaction has been open for too long. Backtrace:\n{}", Backtrace::force_capture()
);
}
}