sql: fixes statement contention count metric#96458
sql: fixes statement contention count metric#96458craig[bot] merged 1 commit intocockroachdb:masterfrom j82w:96429
Conversation
maryliag
left a comment
There was a problem hiding this comment.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @DrewKimball)
DrewKimball
left a comment
There was a problem hiding this comment.
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?
DrewKimball
left a comment
There was a problem hiding this comment.
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