Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contention: refactor to sqlstats collections #94749

Closed
j82w opened this issue Jan 5, 2023 · 0 comments · Fixed by #94750
Closed

contention: refactor to sqlstats collections #94749

j82w opened this issue Jan 5, 2023 · 0 comments · Fixed by #94750
Assignees
Labels
A-sql-observability Related to observability of the SQL layer C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@j82w
Copy link
Contributor

j82w commented Jan 5, 2023

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

@j82w j82w added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-observability Related to observability of the SQL layer T-sql-observability labels Jan 5, 2023
@j82w j82w self-assigned this Jan 5, 2023
craig bot pushed a commit that referenced this issue Jan 9, 2023
94750: contention: refactor to collect in sql stats r=j82w a=j82w

1. All the stats and events are collected in the same place which makes it easier to troubleshoot and maintain.
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.

closes: #94749

Release note: none

Co-authored-by: j82w <[email protected]>
@craig craig bot closed this as completed in bb1b8a1 Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-observability Related to observability of the SQL layer C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant