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

domain: add a config to control updating stats #10772

Merged
merged 5 commits into from Jun 19, 2019

Conversation

@lamxTyler
Copy link
Member

lamxTyler commented Jun 11, 2019

What problem does this PR solve?

We need to disable the updating of stats while still can load the stats.

What is changed and how it works?

Add a bool config update-stats to control the updating stats.

StatsLease EnableUpdateStats Effects
0 0 disable stats
0 1 disable stats
1 0 only load stats
1 1 load stats and update stats

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    Change update-stats to false, the log still shows ["init stats info time"] ["take time"=2.834524ms] but there is no stats update anymore.

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • Need to be included in the release note
Copy link
Contributor

XuHuaiyu left a comment

  1. s/UpdateStats/EnableUpdateStats
  2. We need more description for:
StatsLease UpdateStats
0 0
0 1
1 0
1 1
@lamxTyler lamxTyler requested a review from XuHuaiyu Jun 12, 2019
config/config.toml.example Outdated Show resolved Hide resolved
Copy link
Contributor

XuHuaiyu left a comment

LGTM

config/config.toml.example Outdated Show resolved Hide resolved
@lamxTyler lamxTyler requested a review from winoros Jun 12, 2019
@lamxTyler

This comment has been minimized.

Copy link
Member Author

lamxTyler commented Jun 12, 2019

/run-all-tests tidb-test=release-2.1 tidb-private-test=release-2.1 tikv=release-2.1

Copy link
Member

zz-jason left a comment

LGTM

@zz-jason zz-jason merged commit daa2a08 into pingcap:release-2.1 Jun 19, 2019
6 checks passed
6 checks passed
ci/circleci Your tests passed on CircleCI!
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev_2 Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
@lamxTyler lamxTyler deleted the lamxTyler:update-stats branch Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.