diff --git a/command-line-flags-for-pd-configuration.md b/command-line-flags-for-pd-configuration.md index bf0425f0304e7..c12a03b8a3bf2 100644 --- a/command-line-flags-for-pd-configuration.md +++ b/command-line-flags-for-pd-configuration.md @@ -37,13 +37,13 @@ PD is configurable using command-line flags and environment variables. ## `--config` - The configuration file -- Default: "" +- Default: `""` - If you set the configuration using the command line, the same setting in the configuration file will be overwritten. ## `--data-dir` - The path to the data directory -- Default: "default.${name}" +- Default: `"default.${name}"` ## `--initial-cluster` @@ -59,49 +59,49 @@ PD is configurable using command-line flags and environment variables. ## `--join` - Join the cluster dynamically -- Default: "" +- Default: `""` - If you want to join an existing cluster, you can use `--join="${advertise-client-urls}"`, the `advertise-client-url` is any existing PD's, multiply advertise client urls are separated by comma. ## `-L` - The log level -- Default: "info" -- You can choose from debug, info, warn, error, or fatal. +- Default: `"info"` +- Optional values: `"debug"`, `"info"`, `"warn"`, `"error"`, `"fatal"` ## `--log-file` - The log file -- Default: "" -- If this flag is not set, logs will be written to stderr. Otherwise, logs will be stored in the log file which will be automatically rotated every day. +- Default: `""` +- If this flag is not set, logs will be written to "stderr". If this flag is set, logs are output to the corresponding file. ## `--log-rotate` - To enable or disable log rotation -- Default: true +- Default: `true` - When the value is true, follow the `[log.file]` in PD configuration files. ## `--name` - The human-readable unique name for this PD member -- Default: "pd" +- Default: `"pd"` - If you want to start multiply PDs, you must use different name for each one. ## `--cacert` - The file path of CA, used to enable TLS -- Default: "" +- Default: `""` ## `--cert` - The path of the PEM file including the X509 certificate, used to enable TLS -- Default: "" +- Default: `""` ## `--key` - The path of the PEM file including the X509 key, used to enable TLS -- Default: "" +- Default: `""` ## `--metrics-addr` - The address of Prometheus Pushgateway, which does not push data to Prometheus by default. -- Default: "" +- Default: `""` diff --git a/command-line-flags-for-tidb-configuration.md b/command-line-flags-for-tidb-configuration.md index 13b409dac8a2e..bf62af02eb0dd 100644 --- a/command-line-flags-for-tidb-configuration.md +++ b/command-line-flags-for-tidb-configuration.md @@ -11,82 +11,82 @@ When you start the TiDB cluster, you can use command-line options or environment ## `--advertise-address` - The IP address through which to log into the TiDB server -- Default: "" +- Default: `""` - This address must be accessible by the rest of the TiDB cluster and the user. ## `--config` - The configuration file -- Default: "" +- Default: `""` - If you have specified the configuration file, TiDB reads the configuration file. If the corresponding configuration also exists in the command line options, TiDB uses the configuration in the command line options to overwrite that in the configuration file. For detailed configuration information, see [TiDB Configuration File Description](/tidb-configuration-file.md). ## `--config-check` - Checks the validity of the configuration file and exits -- Default: false +- Default: `false` ## `--config-strict` - Enforces the validity of the configuration file -- Default: false +- Default: `false` ## `--cors` - Specifies the `Access-Control-Allow-Origin` value for Cross-Origin Request Sharing (CORS) request of the TiDB HTTP status service -- Default: "" +- Default: `""` ## `--host` - The host address that the TiDB server monitors -- Default: "0.0.0.0" +- Default: `"0.0.0.0"` - The TiDB server monitors this address. -- The "0.0.0.0" address monitors all network cards by default. If you have multiple network cards, specify the network card that provides service, such as `192.168.100.113`. +- The `"0.0.0.0"` address monitors all network cards by default. If you have multiple network cards, specify the network card that provides service, such as `192.168.100.113`. ## `--enable-binlog` + Enables or disables TiDB binlog generation -+ Default: false ++ Default: `false` ## `-L` - The log level -- Default: "info" -- You can choose from "debug", "info", "warn", "error", or "fatal". +- Default: `"info"` +- Optional values: `"debug"`, `"info"`, `"warn"`, `"error"`, `"fatal"` ## `--lease` - The duration of the schema lease. It is **dangerous** to change the value unless you know what you do. -- Default: 45s +- Default: `45s` ## `--log-file` - The log file -- Default: "" -- If this option is not set, logs are output to "stderr". If this option is set, logs are output to the corresponding file, which is automatically rotated in the early morning every day, and the previous file is renamed as a backup. +- Default: `""` +- If this option is not set, logs are output to "stderr". If this option is set, logs are output to the corresponding file. ## `--log-slow-query` - The directory for the slow query log -- Default: "" +- Default: `""` - If this option is not set, logs are output to the file specified by `--log-file` by default. ## `--metrics-addr` - The Prometheus Pushgateway address -- Default: "" +- Default: `""` - Leaving it empty stops the Prometheus client from pushing. - The format is `--metrics-addr=192.168.100.115:9091`. ## `--metrics-interval` - The Prometheus client push interval in seconds -- Default: 15s +- Default: `15s` - Setting the value to 0 stops the Prometheus client from pushing. ## `-P` - The monitoring port of TiDB services -- Default: "4000" +- Default: `"4000"` - The TiDB server accepts MySQL client requests from this port. ## `--path` @@ -94,13 +94,13 @@ When you start the TiDB cluster, you can use command-line options or environment - The path to the data directory for local storage engine like "unistore" - For `--store = tikv`, you must specify the path; for `--store = unistore`, the default value is used if you do not specify the path. - For the distributed storage engine like TiKV, `--path` specifies the actual PD address. Assuming that you deploy the PD server on 192.168.100.113:2379, 192.168.100.114:2379 and 192.168.100.115:2379, the value of `--path` is "192.168.100.113:2379, 192.168.100.114:2379, 192.168.100.115:2379". -- Default: "/tmp/tidb" +- Default: `"/tmp/tidb"` - You can use `tidb-server --store=unistore --path=""` to enable a pure in-memory TiDB. ## `--proxy-protocol-networks` - The list of proxy server's IP addresses allowed to connect to TiDB using the [PROXY protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). -- Default: "" +- Default: `""` - In general cases, when you access TiDB behind a reverse proxy, TiDB takes the IP address of the reverse proxy server as the IP address of the client. By enabling the PROXY protocol, reverse proxies that support this protocol such as HAProxy can pass the real client IP address to TiDB. - After configuring this flag, TiDB allows the configured source IP address to connect to TiDB using the PROXY protocol; if a protocol other than PROXY is used, this connection will be denied. If this flag is left empty, no IP address can connect to TiDB using the PROXY protocol. The value can be the IP address (192.168.1.50) or CIDR (192.168.1.0/24) with `,` as the separator. `*` means any IP addresses. @@ -111,7 +111,7 @@ When you start the TiDB cluster, you can use command-line options or environment ## `--proxy-protocol-header-timeout` - Timeout for the PROXY protocol header read -- Default: 5 (seconds) +- Default: `5` (seconds) > **Note:** > @@ -132,13 +132,13 @@ When you start the TiDB cluster, you can use command-line options or environment ## `--socket string` - The TiDB services use the unix socket file for external connections. -- Default: "" +- Default: `""` - Use `/tmp/tidb.sock` to open the unix socket file. ## `--status` - The status report port for TiDB server -- Default: "10080" +- Default: `"10080"` - This port is used to get server internal data. The data includes [Prometheus metrics](https://prometheus.io/) and [pprof](https://golang.org/pkg/net/http/pprof/). - Prometheus metrics can be accessed by `"http://host:status_port/metrics"`. - pprof data can be accessed by `"http://host:status_port/debug/pprof"`. @@ -151,46 +151,46 @@ When you start the TiDB cluster, you can use command-line options or environment ## `--store` - Specifies the storage engine used by TiDB in the bottom layer -- Default: "unistore" +- Default: `"unistore"` - You can choose "unistore" or "tikv". ("unistore" is the local storage engine; "tikv" is a distributed storage engine) ## `--token-limit` - The number of sessions allowed to run concurrently in TiDB. It is used for traffic control. -- Default: 1000 +- Default: `1000` - If the number of the concurrent sessions is larger than `token-limit`, the request is blocked and waiting for the operations which have been finished to release tokens. ## `-V` - Outputs the version of TiDB -- Default: "" +- Default: `""` ## `--plugin-dir` + The storage directory for plugins. -+ Default: "/data/deploy/plugin" ++ Default: `"/data/deploy/plugin"` ## `--plugin-load` + The names of the plugins to be loaded, each separated by a comma. -+ Default: "" ++ Default: `""` ## `--affinity-cpus` + Sets the CPU affinity of TiDB servers, which is separated by commas. For example, "1,2,3". -+ Default: "" ++ Default: `""` ## `--repair-mode` + Determines whether to enable the repair mode, which is only used in the data repair scenario. -+ Default: false ++ Default: `false` ## `--repair-list` + The names of the tables to be repaired in the repair mode. -+ Default: "" ++ Default: `""` ## `--require-secure-transport` + Determines whether to require the client to use the secure mode for data transport. -+ Default: false ++ Default: `false` \ No newline at end of file diff --git a/pd-configuration-file.md b/pd-configuration-file.md index 82873189ea228..9f94ac3e3b976 100644 --- a/pd-configuration-file.md +++ b/pd-configuration-file.md @@ -67,7 +67,7 @@ This document only describes parameters that are not included in command-line pa ### `initial-cluster-token` -+ Identifies different clusters during the bootstrap phase. ++ Identifies different clusters during the bootstrap phase + Default value: `"pd-cluster"` + If multiple clusters that have nodes with same configurations are deployed successively, you must specify different tokens to isolate different cluster nodes. @@ -119,7 +119,7 @@ Configuration items related to security ### `redact-info-log` New in v5.0 -+ Controls whether to enable log redaction in the PD log. ++ Controls whether to enable log redaction in the PD log + When you set the configuration value to `true`, user data is redacted in the PD log. + Default value: `false` @@ -129,13 +129,15 @@ Configuration items related to log ### `level` -+ The log level, which can be specified as "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL". -+ Default value: "INFO" ++ Specifies the level of the output log ++ Optional value: `"debug"`, `"info"`, `"warn"`, `"error"`, `"fatal"` ++ Default value: `"info"` ### `format` -+ The log format, which can be specified as "text", "json", or "console" -+ Default value: "text" ++ The log format ++ Optional value: `"text"`, `"json"` ++ Default value: `"text"` ### `disable-timestamp`