cockroachdb / cockroachdb/cockroach
kv: add metric for transaction idle time
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Transactions can be orphaned (client disconnect) or for other reasons, such as extreme contention, and manifest as doing no work for a long time. In almost all cases it warrants a look, especially if it suddenly occurs in the middle of a relative period of steady state.
Requirements:
- Create a histogram metric (name TBD) that samples transaction idle time
- Add p99 (we can workshop the exact percentile) at the bottom of SQL metrics page on DB Console
- Create a runbook for how to set up alerting for this, as well as how to resolve them (e.g. is it contention? is it an orphaned transaction that needs to be killed? how can you identify that detail?)
Jira issue: CRDB-40670
Contributor guide
Assessment
This issue has not been assessed yet.