sql: fix performance when disabling sql.metrics.statement_details#109785
sql: fix performance when disabling sql.metrics.statement_details#109785craig[bot] merged 1 commit intocockroachdb:masterfrom j82w:106811
Conversation
maryliag
left a comment
There was a problem hiding this comment.
this should also be backported to 22.2
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @j82w)
maryliag
left a comment
There was a problem hiding this comment.
looks like something must be wrong with the code because the new test is failing
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @j82w)
…bled There is a performance regression when disabling sql.metrics.statement_details.enabled. It will see that every execution is the first time the query was executed so it will enabled execution stats collection for all executions. This is a bug caused by always collecting the execution stats of the first time a statement is executed in #89418. Fixes: #106811 Release note (bug fix): Fixes a bug causing performance regression when disabling `sql.metrics.statement_details.enabled` which caused execution stats to be collected for all queries instead of the default one percent.
|
The test failure is fixed now. The execution stats are still enabled 1% of the time which caused it to be flaky. I changed the logic so all 4 executions had to have executions stats collected for it to fail. |
|
bors r+ |
|
Build succeeded: |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 716f6a9 to blathers/backport-release-22.2-109785: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.2.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
There is a performance regression when disabling
sql.metrics.statement_details.enabled. It will see that every execution is the first time the query was executed so it will enabled execution stats collection for all executions. This is a bug caused by always collecting the execution stats of the first time a statement is executed in #89418.
Fixes: #106811
Release note (bug fix): Fixes a bug causing performance regression when disabling
sql.metrics.statement_details.enabledwhich caused execution stats to becollected for all queries instead of the default one percent.