-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
reference/configuration: add a guide about how to use dynamic config #3058
Conversation
PTAL @qw4990 @NingLin-P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
可以通过 SQL `show config` 来直接查看集群所有实例的配置信息,结果如下: | ||
|
||
``` | ||
mysql> mysql> show config; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
@rleungx Do these changes apply to v4.0? |
使用 `set config` 时,需要注意: | ||
为了避免和 SQL 变量混淆,TiDB 的配置可以通过 `show config` 查看但是不能进行修改,修改 TiDB 动态配置是会返回错误,如果想动态修改 TiDB 行为,请用对应的 SQL 变量去控制; | ||
某些配置项名称可能和 TiDB 预留关键字冲突,如 `limit`,`key` 等,对于此类配置项,需要用反引号 \` 包裹起来,如 `tikv-client`.`store-limit`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用 `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) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| schedule.max-merge-region-size | 控制 Region Merge 的 size 上限(单位是 M) | | |
| schedule.max-merge-region-size | 控制 Region Merge 的 size 上限(单位是 MB) | |
上述前缀为 `{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` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上述前缀为 `{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`。 |
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>
@NingLin-P @qw4990 PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: NingLin-P <linning@pingcap.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
@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! |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #4128 |
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