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

wrong copr cache metrics #28653

Open
youjiali1995 opened this issue Oct 8, 2021 · 0 comments · May be fixed by #28656
Open

wrong copr cache metrics #28653

youjiali1995 opened this issue Oct 8, 2021 · 0 comments · May be fixed by #28656
Assignees
Labels
component/metrics severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@youjiali1995
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Start a TiDB server and set tikv-client.copr-cache.capacity-mb to 0.

2. What did you expect to see? (Required)

No copr cache metrics or no hit metric.

3. What did you see instead (Required)

It shows and hits always equals misses:
image

The root cause is TiDB uses the wrong metric type. It should use counter instead.

tidb/metrics/distsql.go

Lines 56 to 64 in f44d2cb

DistSQLCoprCacheHistogram = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Namespace: "tidb",
Subsystem: "distsql",
Name: "copr_cache",
Help: "coprocessor cache hit, evict and miss number",
Buckets: prometheus.ExponentialBuckets(1, 2, 16),
}, []string{LblType})
)

4. What is your TiDB version? (Required)

nighlty

@youjiali1995 youjiali1995 added type/bug The issue is confirmed as a bug. severity/minor labels Oct 8, 2021
@youjiali1995 youjiali1995 linked a pull request Oct 8, 2021 that will close this issue
4 tasks
@jebter jebter added the sig/execution SIG execution label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/metrics severity/minor sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants