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

alivxxx
Copy link
Contributor

@alivxxx alivxxx 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

@alivxxx alivxxx added type/enhancement The issue or PR belongs to an enhancement. component/statistics labels Jun 11, 2019
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. s/UpdateStats/EnableUpdateStats
  2. We need more description for:
StatsLease UpdateStats
0 0
0 1
1 0
1 1

@alivxxx alivxxx requested a review from XuHuaiyu June 12, 2019 04:37
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@XuHuaiyu XuHuaiyu added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 12, 2019
config/config.toml.example Outdated Show resolved Hide resolved
@alivxxx alivxxx requested a review from winoros June 12, 2019 08:46
@alivxxx
Copy link
Contributor Author

alivxxx 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 zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. priority/release-blocker This issue blocks a release. Please solve it ASAP. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 19, 2019
@zz-jason zz-jason merged commit daa2a08 into pingcap:release-2.1 Jun 19, 2019
@alivxxx alivxxx deleted the update-stats branch June 19, 2019 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/statistics priority/release-blocker This issue blocks a release. Please solve it ASAP. status/LGT2 Indicates that a PR has LGTM 2. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants