reference/configuration: add a guide about how to use dynamic config#3058
Merged
Conversation
Member
Author
|
PTAL @qw4990 @NingLin-P |
NingLin-P
reviewed
May 13, 2020
| 可以通过 SQL `show config` 来直接查看集群所有实例的配置信息,结果如下: | ||
|
|
||
| ``` | ||
| mysql> mysql> show config; |
Contributor
There was a problem hiding this comment.
Suggested change
| mysql> mysql> show config; | |
| mysql> show config; |
| +---------+------+---------------------------------------------------------------------------------------------------------------+ | ||
| | Level | Code | Message | | ||
| +---------+------+---------------------------------------------------------------------------------------------------------------+ | ||
| | Warning | 1105 | bad request to http://127.0.0.1:20180/config: fail to update, error: "config \"log_level\" can not be change" | |
Contributor
There was a problem hiding this comment.
Suggested change
| | Warning | 1105 | bad request to http://127.0.0.1:20180/config: fail to update, error: "config \"log_level\" can not be change" | | |
| | Warning | 1105 | bad request to http://127.0.0.1:20180/config: fail to update, error: "config log-level can not be change" | |
tikv/tikv#7795 had been updated the error format.
Contributor
|
@rleungx Do these changes apply to v4.0? |
ran-huang
reviewed
May 13, 2020
Comment on lines
+71
to
+73
| 使用 `set config` 时,需要注意: | ||
| 为了避免和 SQL 变量混淆,TiDB 的配置可以通过 `show config` 查看但是不能进行修改,修改 TiDB 动态配置是会返回错误,如果想动态修改 TiDB 行为,请用对应的 SQL 变量去控制; | ||
| 某些配置项名称可能和 TiDB 预留关键字冲突,如 `limit`,`key` 等,对于此类配置项,需要用反引号 \` 包裹起来,如 `tikv-client`.`store-limit`; |
Contributor
There was a problem hiding this comment.
Suggested change
| 使用 `set config` 时,需要注意: | |
| 为了避免和 SQL 变量混淆,TiDB 的配置可以通过 `show config` 查看但是不能进行修改,修改 TiDB 动态配置是会返回错误,如果想动态修改 TiDB 行为,请用对应的 SQL 变量去控制; | |
| 某些配置项名称可能和 TiDB 预留关键字冲突,如 `limit`,`key` 等,对于此类配置项,需要用反引号 \` 包裹起来,如 `tikv-client`.`store-limit`; | |
| > **注意:** | |
| > 为了避免和 SQL 变量混淆,TiDB 的配置可以通过 `show config` 查看但是不能进行修改,修改 TiDB 动态配置时会返回错误;如果想动态修改 TiDB 行为,请用对应的 SQL 变量去控制。 | |
| > 某些配置项名称可能和 TiDB 预留关键字冲突,如 `limit`,`key` 等,对于此类配置项,需要用反引号 ``` ` ``` 包裹起来,如 `tikv-client`.`store-limit`; |
| | --- | --- | | ||
| | log.level| 日志级别 | | ||
| | cluster-version | 集群的版本 | | ||
| | schedule.max-merge-region-size | 控制 Region Merge 的 size 上限(单位是 M) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | schedule.max-merge-region-size | 控制 Region Merge 的 size 上限(单位是 M) | | |
| | schedule.max-merge-region-size | 控制 Region Merge 的 size 上限(单位是 MB) | |
Comment on lines
+189
to
+192
| 上述前缀为 `{db-name}` 或 `{db-name}.{cf-name}` 的参数是 RocksDB 相关的配置 | ||
| `db-name` 的取值可以为是 `rocksdb`, `raftdb` | ||
| 当 `db-name` 为 `rocksdb` 时,cf-name 的取值有: `defaultcf`,`writecf`,`lockcf`,`raftcf` | ||
| 当 `db-name` 为 `raftdb` 时,cf-name 的取值有: `defaultcf` |
Contributor
There was a problem hiding this comment.
Suggested change
| 上述前缀为 `{db-name}` 或 `{db-name}.{cf-name}` 的参数是 RocksDB 相关的配置 | |
| `db-name` 的取值可以为是 `rocksdb`, `raftdb` | |
| 当 `db-name` 为 `rocksdb` 时,cf-name 的取值有: `defaultcf`,`writecf`,`lockcf`,`raftcf` | |
| 当 `db-name` 为 `raftdb` 时,cf-name 的取值有: `defaultcf` | |
| 上述前缀为 `{db-name}` 或 `{db-name}.{cf-name}` 的参数是 RocksDB 相关的配置。`db-name` 的取值可以为是 `rocksdb`, `raftdb`。 | |
| - 当 `db-name` 为 `rocksdb` 时,cf-name 的取值有: `defaultcf`,`writecf`,`lockcf`,`raftcf`; | |
| - 当 `db-name` 为 `raftdb` 时,cf-name 的取值有: `defaultcf`。 |
Contributor
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Member
Author
|
@NingLin-P @qw4990 PTAL |
NingLin-P
reviewed
May 20, 2020
Co-authored-by: NingLin-P <linning@pingcap.com>
ran-huang
reviewed
May 20, 2020
ran-huang
reviewed
May 20, 2020
qw4990
reviewed
May 21, 2020
Signed-off-by: Ryan Leung <rleungx@gmail.com>
TomShawn
reviewed
Jul 28, 2020
ti-srebot
approved these changes
Jul 30, 2020
Contributor
|
/run-all-tests |
Contributor
|
@ran-huang Please be aware of the major changes made in this PR since you finished the translation. Please carefully compare and align these changes, thanks! |
ti-srebot
pushed a commit
to ti-srebot/docs-cn
that referenced
this pull request
Jul 30, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
4 tasks
Contributor
|
cherry pick to release-4.0 in PR #4128 |
9 tasks
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is changed, added or deleted? (Required)
This PR adds a guide about how to use the dynamic config.
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
N/A