You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds logging to the flushAndResolve method in the contention event
store. This method is called periodically at an interval defined by the
(non-public) cluster setting sql.contention.event_store.resolution_interval.
By logging aggregated contention event information, users now have the ability
to find which waiting statements/txns are experiencing high contention through
logs (previously this was only available via insights or SQL activity).
Additionally, this aggregated event information contains the blocking txn and
contended key - information that was previously only available via querying
crdb_internal.transaction_contention_events.
The logs are aggregated by a composite identifier of
(waiting stmt, waiting txn, blocking txn, key), and the total contention time
observed for that combination. They are structured logs. For example:
```
{"Timestamp":1756224167482848000,"EventType":"aggregated_contention_info",
"WaitingStmtFingerprintId":"\\x000000000000007b",
"WaitingTxnFingerprintId":"\\x00000000000001c8",
"BlockingTxnFingerprintId":"\\x0000000000000315",
"ContendedKey":"test-key-1","Duration":300000000}
```
Since this information is available via logs, it provides a solution for users
who desire more persistence of contention event information.
Part of: https://cockroachlabs.atlassian.net/browse/CRDB-53592
Release note (ops change): Adds logging of contention events.
0 commit comments