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

stats: add metircs for high error rate feedback #9209

Merged
merged 6 commits into from Feb 12, 2019

Conversation

@winoros
Copy link
Member

commented Jan 29, 2019

What problem does this PR solve?

Add metrics to count the case when the actual count got by feedback is much different from the expected count calculated by statistics.

Check List

Tests

  • No code

Related changes

  • Need to update the tidb-ansible repository
@codecov-io

This comment has been minimized.

Copy link

commented Jan 29, 2019

Codecov Report

Merging #9209 into master will increase coverage by 0.01%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9209      +/-   ##
==========================================
+ Coverage   67.22%   67.23%   +0.01%     
==========================================
  Files         371      371              
  Lines       77268    77271       +3     
==========================================
+ Hits        51941    51953      +12     
+ Misses      20684    20680       -4     
+ Partials     4643     4638       -5
Impacted Files Coverage Δ
metrics/metrics.go 0% <0%> (ø) ⬆️
statistics/update.go 83.97% <100%> (+0.06%) ⬆️
infoschema/infoschema.go 76.31% <0%> (-1.32%) ⬇️
executor/executor.go 67.31% <0%> (+0.27%) ⬆️
store/tikv/lock_resolver.go 42.65% <0%> (+0.94%) ⬆️
ddl/delete_range.go 79.36% <0%> (+4.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 347c852...b52003f. Read the comment docs.

Show resolved Hide resolved metrics/stats.go Outdated
q.logDetailedInfo(h)
if rate >= MinLogErrorRate && (q.actual >= MinLogScanCount || q.expected >= MinLogScanCount) {
metrics.HighErrorRateFeedBackCounter.Inc()
if log.GetLevel() == log.DebugLevel {

This comment has been minimized.

Copy link
@zz-jason

zz-jason Jan 29, 2019

Member

Can we change this log level to INFO or WARN?

This comment has been minimized.

Copy link
@winoros

winoros Feb 12, 2019

Author Member

This part logs many things and has some heavy calculation. So it would be better to set it to debug level.

prometheus.CounterOpts{
Namespace: "tidb",
Subsystem: "statistics",
Name: "high_error_rate_feedback_total",

This comment has been minimized.

Copy link
@XuHuaiyu

XuHuaiyu Jan 29, 2019

Contributor

Should we update ansible as well?

This comment has been minimized.

Copy link
@winoros

winoros Feb 12, 2019

Author Member

Yes.

@winoros winoros requested review from XuHuaiyu, zz-jason and eurekaka Feb 12, 2019

@zz-jason
Copy link
Member

left a comment

LGTM

@lamxTyler
Copy link
Member

left a comment

LGTM

@lamxTyler lamxTyler added status/LGT2 and removed status/LGT1 labels Feb 12, 2019

@winoros winoros merged commit 8431d11 into pingcap:master Feb 12, 2019

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@winoros winoros deleted the winoros:fb-metrics branch Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.