-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Deprecate vttablet metrics QueryCacheXX
and rename to QueryPlanCacheXX
#16289
Deprecate vttablet metrics QueryCacheXX
and rename to QueryPlanCacheXX
#16289
Conversation
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
@@ -99,7 +99,6 @@ hotRowProtection: | |||
consolidator: enable|disable|notOnPrimary # enable-consolidator, enable-consolidator-replicas | |||
passthroughDML: false # queryserver-config-passthrough-dmls | |||
streamBufferSize: 32768 # queryserver-config-stream-buffer-size | |||
queryCacheSize: 5000 # queryserver-config-query-cache-size |
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.
This flag was removed a while ago, I took the liberty of removing this from the config file.
Signed-off-by: Florent Poinsard <[email protected]>
QueryCacheXX
and rename to QueryPlanCacheXX
QueryCacheXX
and rename to TabletQueryPlanCacheXX
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16289 +/- ##
==========================================
- Coverage 68.68% 68.68% -0.01%
==========================================
Files 1548 1548
Lines 199081 199103 +22
==========================================
Hits 136747 136747
- Misses 62334 62356 +22 ☔ View full report in Codecov by Sentry. |
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.
Can you please address the naming issue?
For metrics PRs, we should always provide a screenshot showing the changed section from the output of the /metrics
endpoint and /debug/vars
endpoint. Looking at /metrics
would have immediately shown you what I said in my review comment.
|
||
> [!NOTE] | ||
> `QueryCache` does not refer to a query cache, but to a query plan cache. | ||
> In v21, these metrics will be deprecated and replaced by `TabletQueryPlanCacheHits` and `TabletQueryPlanCacheMisses`. |
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.
The reason metric names are not prefixed with Tablet
or Gate
is that the binary name is automatically added to the metric name as a prefix. So this becomes vttablet_query_plan_cache_misses
if you look at /metrics
.
All of the metrics introduced in this PR need to be renamed and the Tablet
prefix should be removed.
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.
Maybe you just need to drop the last commit!
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.
That won't work as the vtgate and vttablet metrics will have the same name in vtcombo, leading to a panic/failure.
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.
I will have to see how I can tweak vtcombo. We might already have this situation where the same name is used by both vtgate and vttablet in vtcombo.
Why not do a separate PR just for the v20 release notes? then this can take as much time as necessary. |
That's a good point: #16299 |
…metrics Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
initialHits := qe.queryCacheHits.Get() | ||
initialMisses := qe.queryCacheMisses.Get() |
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.
In order to ensure that we keep testing the old metrics until we delete them, we should keep the tests for them. That will require keeping the struct members also around until the metrics are deleted. Each vttablet has one instance of the queryEngine, so it should not be a big deal.
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.
Done via ade9210
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.
We should do a similar PR for vtgate after this is complete.
Signed-off-by: Florent Poinsard <[email protected]>
VTGate is already using the proper name. vitess/go/vt/vtgate/executor.go Lines 195 to 212 in 75aee8a
|
…lanCacheXX` (vitessio#16289) Signed-off-by: Florent Poinsard <[email protected]>
QueryCacheXX
and rename to TabletQueryPlanCacheXX
QueryCacheXX
and rename to QueryPlanCacheXX
Description
This PR is a follow up of #14947, where we added two new metrics but in the end we would like to rename to
TabletQueryPlanCache
for more clarity and to avoid the ambiguity with an actual query cache.All the
QueryCacheXX
metrics in VTTablet are renamed.We will need to update the release notes of
v20.0.0
and backport only the release notes change torelease-20.0
, I am adding the backport to label, but the backport should not be merge without changing its content.Before
After