Skip to content

Commit

Permalink
upgrade tidb: check DDL and backup status before checking cluster hea…
Browse files Browse the repository at this point in the history
…lth status (#15908) (#15912)
  • Loading branch information
ti-chi-bot authored Dec 29, 2023
1 parent c738ec0 commit bce62b8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions upgrade-tidb-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ Now, the offline mirror has been upgraded successfully. If an error occurs durin
>
> Before you upgrade the cluster to v7.1.3, make sure that the parameters you have modified in v4.0 are compatible in v7.1.3. For details, see [TiKV Configuration File](/tikv-configuration-file.md).
### Step 4: Check the health status of the current cluster
### Step 4: Check the DDL and backup status of the cluster
To avoid undefined behaviors or other unexpected problems during the upgrade, it is recommended to check the following items before the upgrade.
- Cluster DDLs: It is recommended to execute the [`ADMIN SHOW DDL`](/sql-statements/sql-statement-admin-show-ddl.md) statement to check whether there is an ongoing DDL job. If yes, wait for its execution or cancel it by executing the [`ADMIN CANCEL DDL`](/sql-statements/sql-statement-admin-cancel-ddl.md) statement before performing an upgrade.
- Cluster backup: It is recommended to execute the [`SHOW [BACKUPS|RESTORES]`](/sql-statements/sql-statement-show-backups.md) statement to check whether there is an ongoing backup or restore task in the cluster. If yes, wait for its completion before performing an upgrade.
### Step 5: Check the health status of the current cluster
To avoid the undefined behaviors or other issues during the upgrade, it is recommended to check the health status of Regions of the current cluster before the upgrade. To do that, you can use the `check` sub-command.
Expand All @@ -161,13 +168,6 @@ After the command is executed, the "Region status" check result will be output.
+ If the result is "All Regions are healthy", all Regions in the current cluster are healthy and you can continue the upgrade.
+ If the result is "Regions are not fully healthy: m miss-peer, n pending-peer" with the "Please fix unhealthy regions before other operations." prompt, some Regions in the current cluster are abnormal. You need to troubleshoot the anomalies until the check result becomes "All Regions are healthy". Then you can continue the upgrade.
### Step 5: Check the DDL and backup status of the cluster
To avoid undefined behaviors or other unexpected problems during the upgrade, it is recommended to check the following items before the upgrade.
- Cluster DDLs: It is recommended to execute the [`ADMIN SHOW DDL`](/sql-statements/sql-statement-admin-show-ddl.md) statement to check whether there is an ongoing DDL job. If yes, wait for its execution or cancel it by executing the [`ADMIN CANCEL DDL`](/sql-statements/sql-statement-admin-cancel-ddl.md) statement before performing an upgrade.
- Cluster backup: It is recommended to execute the [`SHOW [BACKUPS|RESTORES]`](/sql-statements/sql-statement-show-backups.md) statement to check whether there is an ongoing backup or restore task in the cluster. If yes, wait for its completion before performing an upgrade.
## Upgrade the TiDB cluster
This section describes how to upgrade the TiDB cluster and verify the version after the upgrade.
Expand Down

0 comments on commit bce62b8

Please sign in to comment.