Skip to content

contention: refactor to sqlstats collections #94749

@j82w

Description

@j82w

This is part of #91665. The contention registry should be refactored to be collected with other stats. This issue is only for refactoring the code. Adding the waiting statement info will be done in a separate PR.

The reasons for the refactor:

  1. This ensures that all the stats and events are collected in the same place which makes it easier to troubleshoot and maintain. I
  2. It improves performance by having the contention events processing being done in the same place.
  3. The waiting statement id and waiting statement fingerprint are available higher in stack where the stats are collected. This will make it easier for users to root cause when they have large transactions with many statements.

Jira issue: CRDB-23119

Metadata

Metadata

Assignees

Labels

A-sql-observabilityRelated to observability of the SQL layerC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions