-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: fixes statement contention count metric #96458
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @DrewKimball)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @j82w and @maryliag)
pkg/sql/executor_statement_metrics.go
line 238 at r2 (raw file):
} ex.planner.DistSQLPlanner().distSQLSrv.Metrics.ContendedQueriesCount.Inc(1)
Won't this count number of contention events instead of number of queries with contention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @j82w and @maryliag)
pkg/sql/distsql_running_test.go
line 335 at r3 (raw file):
UPDATE test.test SET x = 100 WHERE x = 1; COMMIT; SET TRACING=off;
[nit] We're no longer setting the tracing to off afterward - is that intentional? Not sure if it matters...
Previously, DrewKimball (Drew Kimball) wrote…
I don't think it should, but I'll add it back to be on the safe side. |
bors r+ |
Build succeeded: |
Fixes a bug introduced in #94750 where the metric
count was counting transaction that hit contention events instead of the statement count.
closes: #96429
Release note: none