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

tikv: add command line flag --config-info #10615

Merged
merged 4 commits into from
Jul 27, 2022
Merged

Conversation

glorv
Copy link
Contributor

@glorv glorv commented Jul 21, 2022

First-time contributors' checklist

What is changed, added or deleted? (Required)

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v6.2 (TiDB 6.2 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 21, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • TomShawn

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot requested a review from TomShawn July 21, 2022 04:17
@ti-chi-bot ti-chi-bot added missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 21, 2022
@glorv
Copy link
Contributor Author

glorv commented Jul 21, 2022

/cc @Oreoxmt

@ti-chi-bot ti-chi-bot requested a review from Oreoxmt July 21, 2022 04:18
@Oreoxmt Oreoxmt added translation/doing This PR’s assignee is translating this PR. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. v6.2 This PR/issue applies to TiDB v6.2. labels Jul 21, 2022
@Oreoxmt Oreoxmt self-assigned this Jul 21, 2022
@ti-chi-bot ti-chi-bot removed the missing-translation-status This PR does not have translation status info. label Jul 21, 2022
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Jul 21, 2022

@glorv Could you please invite a tech review? Thanks

@glorv
Copy link
Contributor Author

glorv commented Jul 21, 2022

@BusyJay PTAL

@Oreoxmt Oreoxmt requested a review from BusyJay July 21, 2022 05:33
@Oreoxmt Oreoxmt added area/engine Indicates that the Issue or PR belongs to the area of TP storage or Cloud storage. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jul 21, 2022
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Jul 21, 2022

/status LGT1

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 21, 2022
## `--config-info <FORMAT>`

+ 输出各个配置项的取值信息并退出
+ 目前仅支持 JSON 格式的输出
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
+ 目前仅支持 JSON 格式的输出
+ `FORMAT` 可选值:`json`

@@ -49,6 +49,12 @@ TiKV 的命令行参数支持一些可读性好的单位转换。
+ 默认:0(无限)
+ PD 需要使用这个值来对整个集群做 balance 操作。(提示:你可以使用 10GB 来替代 10737418240,从而简化参数的传递)。

## `--config-info <FORMAT>`

+ 输出各个配置项的取值信息并退出
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
+ 输出各个配置项的取值信息并退出
+ 按照指定的 `FORMAT` 输出各个配置项的取值信息并退出


+ 输出各个配置项的取值信息并退出
+ 目前仅支持 JSON 格式的输出
+ 目前仅支持输出每个配置项的名字(Name)、默认值(DefaultValue) 和当前配置值(ValueInFile)。当执行此命令时,若同时指定了 `-C` 或 `--config` 参数,则在对应的配置文件包含的配置项会同时输出 `当前配置值`,其他未指定的配置项仅输出默认值。
Copy link
Collaborator

Choose a reason for hiding this comment

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

在这里是否需要给用户一个简单的输出结果示例,让用户可以直观地感受到这个配置的作用,如 tikv/tikv#12956 (comment)


+ 输出各个配置项的取值信息并退出
+ 目前仅支持 JSON 格式的输出
+ 目前仅支持输出每个配置项的名字(Name)、默认值(DefaultValue) 和当前配置值(ValueInFile)。当执行此命令时,若同时指定了 `-C` 或 `--config` 参数,则在对应的配置文件包含的配置项会同时输出 `当前配置值`,其他未指定的配置项仅输出默认值。
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
+ 目前仅支持输出每个配置项的名字(Name)、默认值(DefaultValue) 和当前配置值(ValueInFile)。当执行此命令时,若同时指定了 `-C``--config` 参数,则在对应的配置文件包含的配置项会同时输出 `当前配置值`,其他未指定的配置项仅输出默认值
+ 目前仅支持以 JSON 格式输出每个配置项的名字 (Name)、默认值 (DefaultValue) 和当前配置值 (ValueInFile)。当执行此命令时,若同时指定了 `-C``--config` 参数,则在对应的配置文件包含的配置项会同时输出当前配置值,其他未指定的配置项仅输出默认值,示例如下:
```json
ToDo: Add an example here
```

@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 25, 2022
Copy link
Contributor

@TomShawn TomShawn left a comment

Choose a reason for hiding this comment

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

rest LGTM

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 26, 2022
Copy link
Collaborator

@Oreoxmt Oreoxmt left a comment

Choose a reason for hiding this comment

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

LGTM

@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Jul 27, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: dde30bf

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 27, 2022
@ti-chi-bot ti-chi-bot merged commit d2b9479 into pingcap:master Jul 27, 2022
@Oreoxmt Oreoxmt added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels Aug 1, 2022
@glorv glorv deleted the config-info branch June 21, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/engine Indicates that the Issue or PR belongs to the area of TP storage or Cloud storage. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. v6.2 This PR/issue applies to TiDB v6.2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants