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

conf: rewrite unified pool related configurations #7946

Merged
merged 11 commits into from
Jun 1, 2020

Conversation

sticnarf
Copy link
Contributor

@sticnarf sticnarf commented May 26, 2020

What problem does this PR solve?

Problem Summary:

When TiKV starts, it prints out the configuration in the log. Currently, if use-unified-pool is not set, null will be outputted. This behavior may be confusing to users and the users can fail to know the default setting TiKV uses.

What is changed and how it works?

What's Changed:

Instead of silently using default settings in TiKV, this PR rewrites use-unified-pool with the default setting. Now TiKV prints out the real setting of use-unifed-pool in the start log.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

Now, even if use-unified-pool is not set, the real setting will be printed out like this: (previously readpool.*.use-unified.pool = null)

[2020/05/26 16:07:59.257 +08:00] [INFO] [server.rs:213] ["using config"] [config="{\"cfg-path\":\"conf/tikv.toml\",\"log-level\":\"info\",\"log-file\":\"/home/tidb/tidb-deploy/tikv-20160/log/tikv.log\",\"slow-log-file\":\"\",\"slow-log-threshold\":\"1s\",\"log-rotation-timespan\":\"1d\",\"log-rotation-size\":\"300MiB\",\"panic-when-unexpected-key-or-data\":false,\"readpool\":{\"unified\":{\"min-thread-count\":1,\"max-thread-count\":4,\"stack-size\":\"10MiB\",\"max-tasks-per-worker\":2000},\"storage\":{\"use-unified-pool\":true,\"high-concurrency\":6,\"normal-concurrency\":6,\"low-concurrency\":6,\"max-tasks-per-worker-high\":2000,\"max-tasks-per-worker-normal\":2000,\"max-tasks-per-worker-low\":2000,\"stack-size\":\"10MiB\"},\"coprocessor\":{\"use-unified-pool\":true,\"high-concurrency\":9,\"normal-concurrency\":9,\"low-concurrency\":9,\"max-tasks-per-worker-high\":2000,\"max-tasks-per-worker-normal\":2000,\"max-tasks-per-worker-low\":2000,\"stack-size\":\"10MiB\"}}...

Release note

Prints out the factual use-unified-pool configuration in the startup log.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
@sticnarf sticnarf added type/bugfix This PR fixes a bug. component/configuration Component: Configuration needs-cherry-pick-release-4.0 Type: Need cherry pick to release 4.0 labels May 26, 2020
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
@sticnarf sticnarf force-pushed the fix-unified-config-display branch from 421540b to 3efc1b8 Compare May 27, 2020 06:21
@sticnarf sticnarf requested a review from BusyJay June 1, 2020 02:26
@sticnarf sticnarf added this to the v4.0.1 milestone Jun 1, 2020
@sticnarf sticnarf added the status/can-merge Indicates a PR has been approved by a committer. label Jun 1, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Jun 1, 2020

/run-all-tests

@sre-bot sre-bot merged commit 549b949 into tikv:master Jun 1, 2020
@sticnarf
Copy link
Contributor Author

sticnarf commented Jun 1, 2020

/run-cherry-picker

sre-bot pushed a commit to sre-bot/tikv that referenced this pull request Jun 1, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 1, 2020

cherry pick to release-4.0 in PR #7985

youjiali1995 pushed a commit that referenced this pull request Jun 1, 2020
Co-authored-by: Yilin Chen <sticnarf@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/configuration Component: Configuration needs-cherry-pick-release-4.0 Type: Need cherry pick to release 4.0 status/can-merge Indicates a PR has been approved by a committer. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants