-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(storage): report backtrace on long-lived transactions #5537
Conversation
/// Duration after which we emit the log about long-lived database transactions. | ||
const LONG_TRANSACTION_DURATION: Duration = Duration::from_secs(30); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can do this, if the tx has been open for that long, the perf hit of backtrace capture is negligible imo
This reverts commit 1252dce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is useful and we want this, at least for now to gain more insight into what's leading to long transactions
as mentioned the perf Hit after the tx has been open for so long is negligible and worth it
As per the PR title.
It's hard to identify the source of long-lived transactions, and they bother us because they are growing freelist. So let's capture and log the full backtrace once the transaction duration reaches the threshold of 30 seconds.