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

sql,metrics: ROLLBACK after RELEASE cockroach_restart misclassified in metrics #50780

Closed
nvanbenschoten opened this issue Jun 29, 2020 · 1 comment · Fixed by #59781
Closed
Assignees
Labels
A-sql-execution Relating to SQL execution. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@nvanbenschoten
Copy link
Member

BEGIN; SAVEPOINT cockroach_restart; ...; RELEASE SAVEPOINT cockroach_restart; ROLLBACK; currently increments the following four metrics:

sql.txn.begin.count
sql.restart_savepoint.count
sql.restart_savepoint.release.count
sql.txn.rollback.count

This last metric is incorrect. We should be incrementing the sql.txn.commit.count metric instead, because the transaction has committed.

The fix for this will be to update StatementCounters.incrementCount with condition logic in the tree.RollbackTransaction case that consults the session's state.

@nvanbenschoten nvanbenschoten added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-sql-execution Relating to SQL execution. labels Jun 29, 2020
@knz knz removed their assignment Nov 17, 2020
@knz
Copy link
Contributor

knz commented Nov 17, 2020

@solongordon can you triage this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-execution Relating to SQL execution. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants