summarylogtreecommitdiffstats
path: root/pd.toml
diff options
context:
space:
mode:
authorAllen Zhong2024-03-31 00:23:15 +0900
committerAllen Zhong2024-03-31 00:23:15 +0900
commitee0aa19bacc6089bade67f34de5a3534dae182a5 (patch)
treed4b0e89cfc27f42da7d4ff3b12d8e34f76d83885 /pd.toml
parent4f1e32c7212a4bb84ca471878637bea44b5da3b9 (diff)
downloadaur-tidb-bin.tar.gz
bump 8.0.0
Diffstat (limited to 'pd.toml')
-rw-r--r--pd.toml173
1 files changed, 94 insertions, 79 deletions
diff --git a/pd.toml b/pd.toml
index bb261328836d..2ca0365090f2 100644
--- a/pd.toml
+++ b/pd.toml
@@ -1,44 +1,40 @@
# PD Configuration.
+## Human-readable name for this pd member.
name = "pd"
+## path to the data directory, default: "default.${name}".
data-dir = "/var/lib/pd"
client-urls = "http://127.0.0.1:2379"
## if not set, use ${client-urls}
-advertise-client-urls = ""
+# advertise-client-urls = ""
peer-urls = "http://127.0.0.1:2380"
## if not set, use ${peer-urls}
-advertise-peer-urls = ""
+# advertise-peer-urls = ""
-initial-cluster = "pd=http://127.0.0.1:2380"
-initial-cluster-state = "new"
-
-## set different tokens to prevent communication between PDs in different clusters.
+## The initial cluster configuration for bootstrapping.
+# initial-cluster = ""
+# initial-cluster-state = "new"
+## Set different tokens to prevent communication between PDs in different clusters.
# initial-cluster-token = "pd-cluster"
+## starts a new cluster even if previously started; unsafe.
+# force-new-cluster = false
-lease = 3
-tso-save-interval = "3s"
-
-## Make sure you set the "zone" label for this PD server before enabling its Local TSO service.
-# enable-local-tso = true
-
-enable-prevote = true
-
-[labels]
-## This means **this** PD server belongs to data center "dc-1". Setting it alone won't have any effect.
-## It should be used with enable-local-tso together if you want to make the Local TSO function work.
-# zone="dc-1"
+## Join to an existing cluster. The value should be cluster's ${advertise-client-urls}
+# join = ""
[security]
## Path of file that contains list of trusted SSL CAs. if set, following four settings shouldn't be empty
-cacert-path = ""
+# cacert-path = ""
## Path of file that contains X509 certificate in PEM format.
-cert-path = ""
+# cert-path = ""
## Path of file that contains X509 key in PEM format.
-key-path = ""
-
-cert-allowed-cn = ["example.com"]
+# key-path = ""
+## A CN which must be provided by a client
+# cert-allowed-cn = ["example.com"]
+## Whether or not to enable redact log.
+# redact-info-log = false
[security.encryption]
## Encryption method to use for PD data. One of "plaintext", "aes128-ctr", "aes192-ctr" and "aes256-ctr".
@@ -51,7 +47,7 @@ cert-allowed-cn = ["example.com"]
##
## * "plaintext":
##
-## Plaintext as master key means no master key is given and only applicable when
+## Plaintext as a master key means no master key is given and only applicable when
## encryption is not enabled, i.e. data-encryption-method = "plaintext". This type doesn't
## have sub-config items. Example:
##
@@ -60,7 +56,7 @@ cert-allowed-cn = ["example.com"]
##
## * "kms":
##
-## Use a KMS service to supply master key. Currently only AWS KMS is supported. This type of
+## Use a KMS service to supply a master key. Currently, only AWS KMS is supported. This type of
## master key is recommended for production use. Example:
##
## [security.encryption.master-key]
@@ -77,9 +73,9 @@ cert-allowed-cn = ["example.com"]
## * "file":
##
## Supply a custom encryption key stored in a file. It is recommended NOT to use in production,
-## as it breaks the purpose of encryption at rest, unless the file is stored in tempfs.
+## as it breaks the purpose of encryption at rest unless the file is stored in tempfs.
## The file must contain a 256-bits (32 bytes, regardless of key length implied by
-## data-encryption-method) key encoded as hex string and end with newline ("\n"). Example:
+## data-encryption-method) key encoded as a hex string and end with a newline ("\n"). Example:
##
## [security.encryption.master-key]
## type = "file"
@@ -88,84 +84,100 @@ cert-allowed-cn = ["example.com"]
# type = "plaintext"
[log]
-level = "info"
-
+# level = "info"
## log format, one of json, text, console
# format = "text"
-## disable automatic timestamps in output
-# disable-timestamp = false
-
-# file logging
[log.file]
+## Usually it is set through command line.
# filename = ""
## max log file size in MB
# max-size = 300
## max log file keep days
-# max-days = 28
+# max-days = 0
## maximum number of old log files to retain
-# max-backups = 7
-
-[metric]
-## prometheus client push interval, set "0s" to disable prometheus.
-interval = "15s"
-## prometheus pushgateway address, leaves it empty will disable prometheus.
-address = ""
+# max-backups = 0
[pd-server]
-## the metric storage is the cluster metric storage. This is use for query metric data.
+## The metric storage is the cluster metric storage. This is use for query metric data.
## Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later.
## For usability, recommended to temporarily set it to the prometheus address, eg: http://127.0.0.1:9090
-metric-storage = ""
+# metric-storage = ""
+## There are some values supported: "auto", "none", or a specific address, default: "auto".
+# dashboard-address = "auto"
[schedule]
-max-merge-region-size = 20
-max-merge-region-keys = 200000
-split-merge-interval = "1h"
-max-snapshot-count = 3
-max-pending-peer-count = 16
-max-store-down-time = "30m"
-leader-schedule-limit = 4
-region-schedule-limit = 2048
-replica-schedule-limit = 64
-merge-schedule-limit = 8
-hot-region-schedule-limit = 4
+## Controls the size limit of Region Merge.
+# max-merge-region-size = 20
+## Specifies the upper limit of the Region Merge key.
+# max-merge-region-keys = 200000
+## Controls the time interval between the split and merge operations on the same Region.
+# split-merge-interval = "1h"
+## When PD fails to receive the heartbeat from a store after the specified period of time,
+## it adds replicas at other nodes.
+# max-store-down-time = "30m"
+## Controls the time interval between write hot regions info into leveldb
+# hot-regions-write-interval= "10m"
+## The day of hot regions data to be reserved. 0 means close.
+# hot-regions-reserved-days= 7
+## The number of Leader scheduling tasks performed at the same time.
+# leader-schedule-limit = 4
+## The number of Region scheduling tasks performed at the same time.
+# region-schedule-limit = 2048
+## The number of Replica scheduling tasks performed at the same time.
+# replica-schedule-limit = 64
+## The number of the Region Merge scheduling tasks performed at the same time.
+## Set this parameter to 0 to disable Region Merge.
+# merge-schedule-limit = 8
+## The number of hot Region scheduling tasks performed at the same time.
+# hot-region-schedule-limit = 4
## There are some policies supported: ["count", "size"], default: "count"
# leader-schedule-policy = "count"
## When the score difference between the leader or Region of the two stores is
## less than specified multiple times of the Region size, it is considered in balance by PD.
## If it equals 0.0, PD will automatically adjust it.
# tolerant-size-ratio = 0.0
+## The threshold ratio above which the capacity of the store is insufficient.
+## If the space occupancy ratio of a store exceeds this threshold value,
+## PD avoids migrating data to this store as much as possible.
+# low-space-ratio = 0.8
+
+## The default version of balance Region score calculation.
+# region-score-formula-version = "v2"
-## This three parameters control the merge scheduler behavior.
-## If it is true, it means a region can only be merged into the next region of it.
+## These three parameters control the merge scheduler behavior.
+## If it is true, it means a Region can only be merged into the next Region of it.
# enable-one-way-merge = false
-## If it is true, it means two region within different tables can be merged.
-## This option only works when key type is "table".
+## If it is true, it means two Regions within different tables can be merged.
+## This option only works when the key type is "table".
# enable-cross-table-merge = false
-## customized schedulers, the format is as below
-## if empty, it will use balance-leader, balance-region, hot-region as default
-# [[schedule.schedulers]]
-# type = "evict-leader"
-# args = ["1"]
+## Whether or not to enable joint consensus.
+# enable-joint-consensus = true
[replication]
-## The number of replicas for each region.
-max-replicas = 3
+## The number of replicas for each Region.
+# max-replicas = 3
## The label keys specified the location of a store.
-## The placement priorities is implied by the order of label keys.
+## The placement priorities are implied by the order of label keys.
## For example, ["zone", "rack"] means that we should place replicas to
## different zones first, then to different racks if we don't have enough zones.
-location-labels = []
+# location-labels = []
## Strictly checks if the label of TiKV is matched with location labels.
# strictly-match-label = false
-[label-property]
-## Do not assign region leaders to stores that have these tags.
-# [[label-property.reject-leader]]
-# key = "zone"
-# value = "cn1
+## isolation-level is used to isolate replicas explicitly and forcibly if it's not empty.
+## Its value must be empty or one of location-labels.
+## Example:
+## location-labels = ["zone", "rack", "host"]
+## isolation-level = "zone"
+## With configuration like above, PD ensures that all replicas be placed in different zones.
+## Even if a zone is down, PD will not try to make up replicas in other zone
+## because other zones already have replicas on it.
+# isolation-level = ""
+
+## Whether or not to enable placement rules.
+# enable-placement-rules = true
[dashboard]
## Configurations below are for the TiDB Dashboard embedded in the PD.
@@ -177,19 +189,22 @@ location-labels = []
## The path of the certificate private key.
# tidb-key-path = ""
-## The public path prefix to serve Dashboard urls. It can be set when Dashboard
+## The public path prefix to serve Dashboard URLs. It can be set when Dashboard
## is running behind a reverse proxy. Do not configure it if you access
## Dashboard directly.
# public-path-prefix = "/dashboard"
-## When enabled, request will be proxied to the instance running Dashboard
+## When enabled, the request will be proxied to the instance running Dashboard
## internally instead of result in a 307 redirection.
# internal-proxy = false
## When enabled, usage data will be sent to PingCAP for improving user experience.
-# enable-telemetry = true
+# enable-telemetry = false
+
+[keyspaces]
+## pre-alloc is used to pre-allocate keyspaces during pd bootstrap.
+## Its value should be a list of strings, denotting the name of the keyspaces.
+## Example:
+## pre-alloc = ["admin", "user1", "user2"]
+# pre-alloc = []
-## When enabled, experimental TiDB Dashboard features will be available.
-## These features are incomplete or not well tested. Suggest not to enable in
-## production.
-# enable-experimental = false