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

*: make config items Performance.*, OOMAction and MemQuotaQuery support hot-reloading #10295

Merged
merged 36 commits into from
Apr 29, 2019

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Apr 28, 2019

What problem does this PR solve?

Make some config items Performance.*, OOMAction and MemQuotaQuery support hot-reloading.
Performance.TCPKeepAlive and Performance.StatsLease are not supported now.

What is changed and how it works?

  1. Add a new HTTP API to let users trigger hot-reloading;
  2. Update config package to let it support hot-reloading;
  3. Wrap some variables with atomic to let them can be reloaded safely.

All supported config items are defined in variable hotReloadConfigItems in main.go;

Check List

Tests

  • Unit test

@codecov
Copy link

codecov bot commented Apr 28, 2019

Codecov Report

Merging #10295 into master will decrease coverage by 0.0255%.
The diff coverage is 29.6703%.

@@               Coverage Diff                @@
##             master     #10295        +/-   ##
================================================
- Coverage   77.7588%   77.7332%   -0.0256%     
================================================
  Files           410        410                
  Lines         85117      85163        +46     
================================================
+ Hits          66186      66200        +14     
- Misses        13979      14014        +35     
+ Partials       4952       4949         -3

@qw4990 qw4990 changed the title *: make some config items support hot-reloading *: make config items Performance.XXX, OOMAction and MemQuotaQuery support hot-reloading Apr 29, 2019
@qw4990 qw4990 changed the title *: make config items Performance.XXX, OOMAction and MemQuotaQuery support hot-reloading *: make config items Performance.*, OOMAction and MemQuotaQuery support hot-reloading Apr 29, 2019
tidb-server/main.go Outdated Show resolved Hide resolved
server/http_handler.go Outdated Show resolved Hide resolved
tidb-server/main.go Outdated Show resolved Hide resolved
config/config_test.go Outdated Show resolved Hide resolved
config/config.go Outdated Show resolved Hide resolved
planner/core/cache.go Outdated Show resolved Hide resolved
@qw4990
Copy link
Contributor Author

qw4990 commented Apr 29, 2019

/run-all-tests

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

@qw4990
Copy link
Contributor Author

qw4990 commented Apr 29, 2019

PTAL @lamxTyler @jackysp

Copy link
Contributor

@alivxxx alivxxx left a comment

Choose a reason for hiding this comment

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

LGTM

@alivxxx alivxxx added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 29, 2019
@shenli shenli merged commit 69b02a3 into pingcap:master Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants