cockroachdb / cockroachdb/cockroach

sql: transaction idle latency is incorrect for open transactions

Open
#142,135 1 comment 0 reactions 0 assignees View on GitHub
branch-release-24.3 branch-release-25.1 branch-release-25.2 C-bug O-support P-3 T-observability
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

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.