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

Add a note on QueryCacheHits and QueryCacheMisses in the release notes #16299

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions changelog/20.0/20.0.0/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,12 @@ You can now run `VDiff`s on OnlineDDL schema change migrations, which are not ye

VTTablet exposes two new counter stats:

* `QueryCacheHits`: Query engine query cache hits
* `QueryCacheMisses`: Query engine query cache misses
* `QueryCacheHits`: Query engine query plan cache hits
* `QueryCacheMisses`: Query engine query plan cache misses

> [!NOTE]
> `QueryCache` does not refer to a query cache, but to a query plan cache.
> In v21, these metrics will be deprecated and renamed.

### <a id="vttablet-query-text-characters-processed"/>VTTablet Query Text Characters Processed

Expand Down
8 changes: 6 additions & 2 deletions changelog/20.0/20.0.0/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,12 @@ You can now run `VDiff`s on OnlineDDL schema change migrations, which are not ye

VTTablet exposes two new counter stats:

* `QueryCacheHits`: Query engine query cache hits
* `QueryCacheMisses`: Query engine query cache misses
* `QueryCacheHits`: Query engine query plan cache hits
* `QueryCacheMisses`: Query engine query plan cache misses

> [!NOTE]
> `QueryCache` does not refer to a query cache, but to a query plan cache.
> In v21, these metrics will be deprecated and renamed.

### <a id="vttablet-query-text-characters-processed"/>VTTablet Query Text Characters Processed

Expand Down
12 changes: 6 additions & 6 deletions go/vt/vttablet/tabletserver/query_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,22 +269,22 @@ func NewQueryEngine(env tabletenv.Env, se *schema.Engine) *QueryEngine {
env.Exporter().NewGaugeFunc("StreamBufferSize", "Query engine stream buffer size", qe.streamBufferSize.Load)
env.Exporter().NewCounterFunc("TableACLExemptCount", "Query engine table ACL exempt count", qe.tableaclExemptCount.Load)

env.Exporter().NewGaugeFunc("QueryCacheLength", "Query engine query cache length", func() int64 {
env.Exporter().NewGaugeFunc("QueryCacheLength", "Query engine query plan cache length", func() int64 {
return int64(qe.plans.Len())
})
env.Exporter().NewGaugeFunc("QueryCacheSize", "Query engine query cache size", func() int64 {
env.Exporter().NewGaugeFunc("QueryCacheSize", "Query engine query plan cache size", func() int64 {
return int64(qe.plans.UsedCapacity())
})
env.Exporter().NewGaugeFunc("QueryCacheCapacity", "Query engine query cache capacity", func() int64 {
env.Exporter().NewGaugeFunc("QueryCacheCapacity", "Query engine query plan cache capacity", func() int64 {
return int64(qe.plans.MaxCapacity())
})
env.Exporter().NewCounterFunc("QueryCacheEvictions", "Query engine query cache evictions", func() int64 {
env.Exporter().NewCounterFunc("QueryCacheEvictions", "Query engine query plan cache evictions", func() int64 {
return qe.plans.Metrics.Evicted()
})
qe.queryCacheHits = env.Exporter().NewCounterFunc("QueryCacheHits", "Query engine query cache hits", func() int64 {
qe.queryCacheHits = env.Exporter().NewCounterFunc("QueryCacheHits", "Query engine query plan cache hits", func() int64 {
return qe.plans.Metrics.Hits()
})
qe.queryCacheMisses = env.Exporter().NewCounterFunc("QueryCacheMisses", "Query engine query cache misses", func() int64 {
qe.queryCacheMisses = env.Exporter().NewCounterFunc("QueryCacheMisses", "Query engine query plan cache misses", func() int64 {
return qe.plans.Metrics.Misses()
})

Expand Down
Loading