cockroachdb / cockroachdb/cockroach

kv: add metric for transaction idle time

Open
#127,916 0 comments 0 reactions 0 assignees View on GitHub
A-kv C-enhancement T-kv
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.