cockroachdb / cockroachdb/cockroach
sql: transaction idle latency is incorrect for open transactions
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
While investigating support issue [#3197](https://github.com/cockroachlabs/support/issues/3197), we noted that a transaction had less than a second of active time, 2.6s of idle time and a 13min duration. It was not immediately obvious that the transaction was still open and so the disposition of the transaction's time was a bit of a mystery. Turns out that the application had omitted a COMMIT/ABORT, so transaction idle time wasn't accrued properly.
Observability should report current idle time at the time the observation is made, adding idle time from the last statement as necessary.
This probably would have prevented an escalation had the idle time been reported correctly.
Jira issue: CRDB-48187
Contributor guide
Assessment
This issue has not been assessed yet.