-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
distsql: fix copr cache events metric #28656
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: youjiali1995 <[email protected]>
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
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.
LGTM
Maybe simply change tidb/metrics/grafana/tidb.json Line 6660 in 340abf0
|
Yes, but I think histogram doesn't make sense here. |
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.
Both Counter and Histogram make sense in some ways.
By using a counter, you can know the overall hit rate for all coprocessor requests.
By using a histogram, you can know the 95% SQL statement hit rate (if use a percentile function correctly).
@lzmhhh123 PTAL
TiDB uses telemetry to record the hit rate.🤯 |
@youjiali1995: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: youjiali1995 [email protected]
What problem does this PR solve?
Issue Number: close #28653
Problem Summary:
The type of copr cache events metric is wrong(histogram). It should be counter.
What is changed and how it works?
What's Changed:
Fix the metric type.
How it Works:

Before:
hit and miss are always equal even if the copr cache is disabled.
After:

Check List
Tests
Side effects
Documentation
Release note