From 5958f2e87e3aef980ea638104c0631543fd1d89e Mon Sep 17 00:00:00 2001 From: yikeke Date: Fri, 5 Jun 2020 10:00:11 +0800 Subject: [PATCH 1/3] translate https://github.com/pingcap/docs-cn/pull/3204/ and https://github.com/pingcap/docs-cn/pull/3425/ --- maintain-tidb-using-tiup.md | 46 ++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/maintain-tidb-using-tiup.md b/maintain-tidb-using-tiup.md index 31ad44db1b2a8..7cfdcc8fc71d7 100644 --- a/maintain-tidb-using-tiup.md +++ b/maintain-tidb-using-tiup.md @@ -110,7 +110,7 @@ When the cluster is in operation, if you need to modify the parameters of a comp log.slow-threshold: 300 ``` - For the parameter format, see the [TiUP parameter template](https://github.com/pingcap-incubator/tiup-cluster/blob/master/examples/topology.example.yaml). + For the parameter format, see the [TiUP parameter template](https://github.com/pingcap/tiup/blob/master/examples/topology.example.yaml). **Use `.` to represent the hierarchy of the configuration items**. @@ -136,6 +136,50 @@ server_configs: Then run the `tiup cluster reload ${cluster-name} -N tidb` command to rolling restart the TiDB component. +## Replace with a hotfix package + +For normal upgrade, see [Upgrade TiDB Using TiUP](/upgrade-tidb-using-tiup.md). But in some scenarios, such as debugging, you might need to replace the currently running component with a temporary package. To achieve this, use the `patch` command: + +{{< copyable "shell-root" >}} + +```bash +tiup cluster patch --help +``` + +``` +Replace the remote package with a specified package and restart the service + +Usage: + cluster patch [flags] + +Flags: + -h, --help help for patch + -N, --node strings Specify the nodes + --overwrite Use this package in the future scale-out operations + -R, --role strings Specify the role + --transfer-timeout int Timeout in seconds when transferring PD and TiKV store leaders (default 300) + +Global Flags: + --ssh-timeout int Timeout in seconds to connect host via SSH, ignored for operations that don't need an SSH connection. (default 5) + -y, --yes Skip all confirmations and assumes 'yes' +``` + +If a TiDB hotfix package is in `/tmp/tidb-hotfix.tar.gz` and you want to replace all the TiDB packages in the cluster, run the following command: + +{{< copyable "shell-regular" >}} + +```bash +tiup cluster patch test-cluster /tmp/tidb-hotfix.tar.gz -R tidb +``` + +You can also replace only one TiDB package in the cluster: + +{{< copyable "shell-regular" >}} + +```bash +tiup cluster patch test-cluster /tmp/tidb-hotfix.tar.gz -N 172.16.4.5:4000 +``` + ## Stop the cluster The components in the TiDB cluster are stopped in the following order (The monitoring component is also stopped): From 80662fc57bd72a7ef3612e66a4b2a43cff213fae Mon Sep 17 00:00:00 2001 From: yikeke Date: Tue, 9 Jun 2020 13:28:21 +0800 Subject: [PATCH 2/3] align https://github.com/pingcap/docs-cn/pull/3570/files --- maintain-tidb-using-tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintain-tidb-using-tiup.md b/maintain-tidb-using-tiup.md index 7cfdcc8fc71d7..d4b81670be389 100644 --- a/maintain-tidb-using-tiup.md +++ b/maintain-tidb-using-tiup.md @@ -134,7 +134,7 @@ server_configs: performance.txn-total-size-limit: 1073741824 ``` -Then run the `tiup cluster reload ${cluster-name} -N tidb` command to rolling restart the TiDB component. +Then run the `tiup cluster reload ${cluster-name} -R tidb` command to rolling restart the TiDB component. ## Replace with a hotfix package From 77a42d28e3e2c32e56371e1e5c5d770ac6d71eef Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Tue, 9 Jun 2020 13:55:55 +0800 Subject: [PATCH 3/3] trigger ci --- maintain-tidb-using-tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintain-tidb-using-tiup.md b/maintain-tidb-using-tiup.md index d4b81670be389..4f0229afac11c 100644 --- a/maintain-tidb-using-tiup.md +++ b/maintain-tidb-using-tiup.md @@ -134,7 +134,7 @@ server_configs: performance.txn-total-size-limit: 1073741824 ``` -Then run the `tiup cluster reload ${cluster-name} -R tidb` command to rolling restart the TiDB component. +Then, run the `tiup cluster reload ${cluster-name} -R tidb` command to rolling restart the TiDB component. ## Replace with a hotfix package