Skip to content

Commit 2d9ab6e

Browse files
Merge branch 'pingcap:master' into orderratio
2 parents bbea3d9 + cb80cfb commit 2d9ab6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+935
-300
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Currently, we maintain the following versions of TiDB documentation in different
2828
| Branch name | TiDB docs version |
2929
| :---------|:----------|
3030
| [`master`](https://github.com/pingcap/docs/tree/master) | The latest development version |
31+
| [`release-8.0`](https://github.com/pingcap/docs/tree/release-8.0) | 8.0 Development Milestone Release |
3132
| [`release-7.6`](https://github.com/pingcap/docs/tree/release-7.6) | 7.6 Development Milestone Release |
3233
| [`release-7.5`](https://github.com/pingcap/docs/tree/release-7.5) | 7.5 LTS (Long-Term Support) |
3334
| [`release-7.4`](https://github.com/pingcap/docs/tree/release-7.4) | 7.4 Development Milestone Release |

TOC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@
10391039
- [TiDB Versioning](/releases/versioning.md)
10401040
- [TiDB Installation Packages](/binary-package.md)
10411041
- v7.6
1042-
- [7.6.0](/releases/release-7.6.0.md)
1042+
- [7.6.0-DMR](/releases/release-7.6.0.md)
10431043
- v7.5
10441044
- [7.5.1](/releases/release-7.5.1.md)
10451045
- [7.5.0](/releases/release-7.5.0.md)

basic-features.md

Lines changed: 209 additions & 205 deletions
Large diffs are not rendered by default.

br/backup-and-restore-use-cases.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: TiDB Backup and Restore Use Cases
3-
summary: TiDB provides snapshot and log backup solutions for specific use cases, such as timely data recovery and business audits. To use point-in-time recovery (PITR), deploy a TiDB cluster >= v6.2.0 and update BR to v7.6.0. Configure backup storage on Amazon S3 and set a backup policy to meet data loss and recovery requirements. Run log and snapshot backups, and use PITR to restore data to a specific time point. Clean up outdated data regularly. For detailed steps, refer to TiDB documentation.
3+
summary: TiDB provides snapshot and log backup solutions for specific use cases, such as timely data recovery and business audits. To use point-in-time recovery (PITR), deploy a TiDB cluster >= v6.2.0 and update BR to v8.0.0. Configure backup storage on Amazon S3 and set a backup policy to meet data loss and recovery requirements. Run log and snapshot backups, and use PITR to restore data to a specific time point. Clean up outdated data regularly. For detailed steps, refer to TiDB documentation.
44
aliases: ['/docs/dev/br/backup-and-restore-use-cases/','/docs/dev/reference/tools/br/use-cases/','/tidb/dev/backup-and-restore-use-cases-for-maintain/']
55
---
66

@@ -17,7 +17,7 @@ With PITR, you can satisfy the preceding requirements.
1717

1818
## Deploy the TiDB cluster and BR
1919

20-
To use PITR, you need to deploy a TiDB cluster >= v6.2.0 and update BR to the same version as the TiDB cluster. This document uses v7.6.0 as an example.
20+
To use PITR, you need to deploy a TiDB cluster >= v6.2.0 and update BR to the same version as the TiDB cluster. This document uses v8.0.0 as an example.
2121

2222
The following table shows the recommended hardware resources for using PITR in a TiDB cluster.
2323

@@ -44,13 +44,13 @@ Install or upgrade BR using TiUP:
4444
- Install:
4545

4646
```shell
47-
tiup install br:v7.6.0
47+
tiup install br:v8.0.0
4848
```
4949

5050
- Upgrade:
5151

5252
```shell
53-
tiup update br:v7.6.0
53+
tiup update br:v8.0.0
5454
```
5555

5656
## Configure backup storage (Amazon S3)

br/br-snapshot-guide.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ The output is as follows, corresponding to the physical time `2022-09-08 13:30:0
6262

6363
## Restore cluster snapshots
6464

65+
> **Note:**
66+
>
67+
> - For BR v7.5.0 and earlier versions, the snapshot restore speed per TiKV node is approximately 100 MiB/s.
68+
> - Starting from BR v7.6.0, to address potential restore bottlenecks in scenarios with large-scale Regions, BR supports accelerating restore through the coarse-grained Region scattering algorithm (experimental). You can enable this feature by specifying the command-line parameter `--granularity="coarse-grained"`.
69+
> - Starting from BR v8.0.0, the snapshot restore through the coarse-grained Region scattering algorithm is generally available (GA) and enabled by default. BR improves the snapshot restore speed significantly by implementing various optimizations such as adopting the coarse-grained Region scattering algorithm, creating databases and tables in batches, reducing the mutual impact between SST file downloads and ingest operations, and accelerating the restore of table statistics. According to test results from real-world cases, the SST file download speed for snapshot restore is improved by approximately up to 10 times, the data restore speed per TiKV node stabilizes at 1.2 GiB/s, the end-to-end restore speed is improved by approximately 1.5 to 3 times, and 100 TiB of data can be restored within one hour.
70+
6571
You can restore a snapshot backup by running the `br restore full` command. Run `br restore full --help` to see the help information:
6672

6773
The following example restores the [preceding backup snapshot](#back-up-cluster-snapshots) to a target cluster:
@@ -208,7 +214,7 @@ The impact of backup on cluster performance can be reduced by limiting the backu
208214

209215
- During data restore, TiDB tries to fully utilize the TiKV CPU, disk IO, and network bandwidth resources. Therefore, it is recommended to restore the backup data on an empty cluster to avoid affecting the running applications.
210216
- The speed of restoring backup data is much related with the cluster configuration, deployment, and running applications. In internal tests, the restore speed of a single TiKV node can reach 100 MiB/s. The performance and impact of snapshot restore are varied in different user scenarios and should be tested in actual environments.
211-
- Starting from v7.6.0, to accelerate restore speed in large-scale Region scenarios, BR introduces an experimental feature that allows you to enable a coarse-grained Region scatter algorithm by specifying the command-line parameter `--granularity="coarse-grained"`. This algorithm ensures that each TiKV node receives stable and evenly distributed download tasks, thus fully utilizing the resources of each TiKV node and achieving a rapid parallel recovery. In several real-world cases, the snapshot restore speed of the cluster is improved by about 10 times in large-scale Region scenarios. The following is an example:
217+
- BR provides a coarse-grained Region scattering algorithm to accelerate Region restore in large-scale Region scenarios. The algorithm is controlled by the command-line parameter `--granularity="coarse-grained"` and is enabled by default. This algorithm ensures that each TiKV node receives stable and evenly distributed download tasks, thus fully utilizing the resources of each TiKV node and achieving a rapid parallel recovery. In several real-world cases, the snapshot restore speed of the cluster is improved by about 3 times in large-scale Region scenarios. The following is an example:
212218

213219
```bash
214220
br restore full \
@@ -220,6 +226,13 @@ The impact of backup on cluster performance can be reduced by limiting the backu
220226
--log-file restorefull.log
221227
```
222228

229+
- Starting from v8.0.0, the `br` command-line tool introduces the `--tikv-max-restore-concurrency` parameter to control the maximum number of files that BR downloads and ingests per TiKV node. By configuring this parameter, you can also control the maximum length of the job queue (the maximum length of the job queue = 32 \* the number of TiKV nodes \* `--tikv-max-restore-concurrency`), thereby controlling the memory consumption of the BR node.
230+
231+
In normal cases, `--tikv-max-restore-concurrency` is automatically adjusted based on the cluster configuration, so manual configuration is unnecessary. If the **TiKV-Details** > **Backup & Import** > **Import RPC count** monitoring metric in Grafana shows that the number of files BR downloads remains close to 0 for a long time while the number of files that BR ingests consistently reaches the upper limit, it indicates that ingesting file tasks pile up and the job queue has reached its maximum length. In this case, you can take the following measures to alleviate the task pilling-up issue:
232+
233+
- Set the `--ratelimit` parameter to limit the download speed, ensuring sufficient resources for ingesting file tasks. For example, if the disk throughput of any TiKV node is `x MiB/s` and the network bandwidth for downloading backup files exceeds `x/2 MiB/s`, you can set the parameter as `--ratelimit x/2`. If the disk throughput of any TiKV node is `x MiB/s` and the network bandwidth for downloading backup files is less than or equal to `x/2 MiB/s`, you can leave the parameter `--ratelimit` unset.
234+
- Increase the `--tikv-max-restore-concurrency` to increase the maximum length of the job queue.
235+
223236
## See also
224237

225238
* [TiDB Backup and Restore Use Cases](/br/backup-and-restore-use-cases.md)

develop/dev-guide-sample-application-nodejs-mysql2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ npm start
189189
If the connection is successful, the console will output the version of the TiDB cluster as follows:
190190

191191
```
192-
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v7.6.0)
192+
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v8.0.0)
193193
⏳ Loading sample game data...
194194
✅ Loaded sample game data.
195195

develop/dev-guide-sample-application-nodejs-mysqljs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ npm start
189189
If the connection is successful, the console will output the version of the TiDB cluster as follows:
190190

191191
```
192-
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v7.6.0)
192+
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v8.0.0)
193193
⏳ Loading sample game data...
194194
✅ Loaded sample game data.
195195

develop/dev-guide-sample-application-nodejs-typeorm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ npm start
231231
If the connection is successful, the terminal will output the version of the TiDB cluster as follows:
232232

233233
```
234-
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v7.6.0)
234+
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v8.0.0)
235235
🆕 Created a new player with ID 2.
236236
ℹ️ Got Player 2: Player { id: 2, coins: 100, goods: 100 }
237237
🔢 Added 50 coins and 50 goods to player 2, now player 2 has 100 coins and 150 goods.

develop/dev-guide-sample-application-ruby-mysql2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ ruby app.rb
190190
If the connection is successful, the console will output the version of the TiDB cluster as follows:
191191

192192
```
193-
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v7.6.0)
193+
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v8.0.0)
194194
⏳ Loading sample game data...
195195
✅ Loaded sample game data.
196196

develop/dev-guide-sample-application-ruby-rails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Connect to your TiDB cluster depending on the TiDB deployment option you've sele
183183
If the connection is successful, the console will output the version of the TiDB cluster as follows:
184184

185185
```
186-
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v7.6.0)
186+
🔌 Connected to TiDB cluster! (TiDB version: 8.0.11-TiDB-v8.0.0)
187187
⏳ Loading sample game data...
188188
✅ Loaded sample game data.
189189

0 commit comments

Comments
 (0)