From 04207a754828718d69dd8f733f9b5a831ef2cd78 Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Wed, 25 Aug 2021 16:44:55 +0200 Subject: [PATCH 1/6] BR FAQ: add a warning about multi br importing --- br/backup-and-restore-faq.md | 8 ++++++++ br/use-br-command-line-tool.md | 2 ++ 2 files changed, 10 insertions(+) diff --git a/br/backup-and-restore-faq.md b/br/backup-and-restore-faq.md index 1bb6ec0021e2a..fdbc24f3c36ba 100644 --- a/br/backup-and-restore-faq.md +++ b/br/backup-and-restore-faq.md @@ -95,3 +95,11 @@ BR does not back up statistics (except in v4.0.9). Therefore, after restoring th In v4.0.9, BR backs up statistics by default, which consumes too much memory. To ensure that the backup process goes well, the backup for statistics is disabled by default starting from v4.0.10. If you do not execute `ANALYZE` on the table, TiDB will fail to select the optimized execution plan due to inaccurate statistics. If query performance is not a key concern, you can ignore `ANALYZE`. + +## Can I use multiple BR command-lines at a single time to restore the data of a single cluster? + +**It is strongly not recommended** to use multiple BR command-lines at a single time to restore the data of a single cluster for the following reasons: + ++ When BR restores data, it modifies some of the global configurations of PD. Therefore, if you use multiple BR command-lines for data restoration at a single time, these configurations might be mistakenly overridden and cause abnormal cluster status. ++ BR uses a lot of cluster resources to restore data, so in fact, running BR command-lines in parallel has very limited effects to improve the speed of restoration. ++ There was no test for running multiple BR command-lines in parallel for data restoration, so it is not guaranteed to succeed. \ No newline at end of file diff --git a/br/use-br-command-line-tool.md b/br/use-br-command-line-tool.md index 6921d73670a03..76cd1b5173255 100644 --- a/br/use-br-command-line-tool.md +++ b/br/use-br-command-line-tool.md @@ -307,6 +307,8 @@ To restore the cluster data, use the `br restore` command. You can add the `full > - Where each peer is scattered to during restore is random. We don't know in advance which node will read which file. > > These can be avoided using shared storage, for example mounting an NFS on the local path, or using S3. With network storage, every node can automatically read every SST file, so these caveats no longer apply. +> +> At the same time, note that you can only run one restore operation for a single cluster at a single time. Otherwise, unexpected circumstances might occur. For details, see [FAQ](/br/backup-and-restore-faq.md#can-i-use-multiple-br-command-lines-at-a-single-time-to-restore-the-data-of-a-single-cluster). ### Restore all the backup data From 10d55a3b64a0ee05ad5c0a5ee1d06fc8c1e7e38e Mon Sep 17 00:00:00 2001 From: Enwei Date: Thu, 2 Sep 2021 08:13:26 +0200 Subject: [PATCH 2/6] change a noun --- br/backup-and-restore-faq.md | 6 +++--- br/use-br-command-line-tool.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/br/backup-and-restore-faq.md b/br/backup-and-restore-faq.md index fdbc24f3c36ba..c93d01a254317 100644 --- a/br/backup-and-restore-faq.md +++ b/br/backup-and-restore-faq.md @@ -96,10 +96,10 @@ In v4.0.9, BR backs up statistics by default, which consumes too much memory. To If you do not execute `ANALYZE` on the table, TiDB will fail to select the optimized execution plan due to inaccurate statistics. If query performance is not a key concern, you can ignore `ANALYZE`. -## Can I use multiple BR command-lines at a single time to restore the data of a single cluster? +## Can I use multiple BR command-lines at the same time to restore the data of a single cluster? -**It is strongly not recommended** to use multiple BR command-lines at a single time to restore the data of a single cluster for the following reasons: +**It is strongly not recommended** to use multiple BR command-lines at the same time to restore the data of a single cluster for the following reasons: -+ When BR restores data, it modifies some of the global configurations of PD. Therefore, if you use multiple BR command-lines for data restoration at a single time, these configurations might be mistakenly overridden and cause abnormal cluster status. ++ When BR restores data, it modifies some of the global configurations of PD. Therefore, if you use multiple BR command-lines for data restoration at the same time, these configurations might be mistakenly overridden and cause abnormal cluster status. + BR uses a lot of cluster resources to restore data, so in fact, running BR command-lines in parallel has very limited effects to improve the speed of restoration. + There was no test for running multiple BR command-lines in parallel for data restoration, so it is not guaranteed to succeed. \ No newline at end of file diff --git a/br/use-br-command-line-tool.md b/br/use-br-command-line-tool.md index 76cd1b5173255..ee95c049d03fb 100644 --- a/br/use-br-command-line-tool.md +++ b/br/use-br-command-line-tool.md @@ -308,7 +308,7 @@ To restore the cluster data, use the `br restore` command. You can add the `full > > These can be avoided using shared storage, for example mounting an NFS on the local path, or using S3. With network storage, every node can automatically read every SST file, so these caveats no longer apply. > -> At the same time, note that you can only run one restore operation for a single cluster at a single time. Otherwise, unexpected circumstances might occur. For details, see [FAQ](/br/backup-and-restore-faq.md#can-i-use-multiple-br-command-lines-at-a-single-time-to-restore-the-data-of-a-single-cluster). +> Also, note that you can only run one restore operation for a single cluster at the same time. Otherwise, unexpected circumstances might occur. For details, see [FAQ](/br/backup-and-restore-faq.md#can-i-use-multiple-br-command-lines-at-a-single-time-to-restore-the-data-of-a-single-cluster). ### Restore all the backup data From 1f14ac690ced1cfb9194f0f810e8d5a38b49c6cc Mon Sep 17 00:00:00 2001 From: Enwei Date: Thu, 2 Sep 2021 10:22:21 +0200 Subject: [PATCH 3/6] fix CI error --- br/use-br-command-line-tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/use-br-command-line-tool.md b/br/use-br-command-line-tool.md index ee95c049d03fb..8adf43c8a52a5 100644 --- a/br/use-br-command-line-tool.md +++ b/br/use-br-command-line-tool.md @@ -308,7 +308,7 @@ To restore the cluster data, use the `br restore` command. You can add the `full > > These can be avoided using shared storage, for example mounting an NFS on the local path, or using S3. With network storage, every node can automatically read every SST file, so these caveats no longer apply. > -> Also, note that you can only run one restore operation for a single cluster at the same time. Otherwise, unexpected circumstances might occur. For details, see [FAQ](/br/backup-and-restore-faq.md#can-i-use-multiple-br-command-lines-at-a-single-time-to-restore-the-data-of-a-single-cluster). +> Also, note that you can only run one restore operation for a single cluster at the same time. Otherwise, unexpected circumstances might occur. For details, see [FAQ](/br/backup-and-restore-faq.md#can-i-use-multiple-br-command-lines-at-the-same-time-to-restore-the-data-of-a-single-cluster). ### Restore all the backup data From ad8d324bf8b9c7dd1ebb019f9ebb0586c00c7926 Mon Sep 17 00:00:00 2001 From: Enwei Date: Thu, 2 Sep 2021 15:45:02 +0200 Subject: [PATCH 4/6] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- br/backup-and-restore-faq.md | 10 +++++----- br/use-br-command-line-tool.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/br/backup-and-restore-faq.md b/br/backup-and-restore-faq.md index c93d01a254317..2d981028ac2ea 100644 --- a/br/backup-and-restore-faq.md +++ b/br/backup-and-restore-faq.md @@ -96,10 +96,10 @@ In v4.0.9, BR backs up statistics by default, which consumes too much memory. To If you do not execute `ANALYZE` on the table, TiDB will fail to select the optimized execution plan due to inaccurate statistics. If query performance is not a key concern, you can ignore `ANALYZE`. -## Can I use multiple BR command-lines at the same time to restore the data of a single cluster? +## Can I use multiple BR processes at the same time to restore the data of a single cluster? -**It is strongly not recommended** to use multiple BR command-lines at the same time to restore the data of a single cluster for the following reasons: +**It is strongly not recommended** to use multiple BR processes at the same time to restore the data of a single cluster for the following reasons: -+ When BR restores data, it modifies some of the global configurations of PD. Therefore, if you use multiple BR command-lines for data restoration at the same time, these configurations might be mistakenly overridden and cause abnormal cluster status. -+ BR uses a lot of cluster resources to restore data, so in fact, running BR command-lines in parallel has very limited effects to improve the speed of restoration. -+ There was no test for running multiple BR command-lines in parallel for data restoration, so it is not guaranteed to succeed. \ No newline at end of file ++ When BR restores data, it modifies some of the global configurations of PD. Therefore, if you use multiple BR processes for data restore at the same time, these configurations might be mistakenly overwritten and cause abnormal cluster status. ++ BR consumes a lot of cluster resources to restore data, so in fact, running BR processes in parallel improves the restore speed only to a limited extent. ++ There has been no test for running multiple BR processes in parallel for data restore, so it is not guaranteed to succeed. \ No newline at end of file diff --git a/br/use-br-command-line-tool.md b/br/use-br-command-line-tool.md index 8adf43c8a52a5..136e38d10bb54 100644 --- a/br/use-br-command-line-tool.md +++ b/br/use-br-command-line-tool.md @@ -308,7 +308,7 @@ To restore the cluster data, use the `br restore` command. You can add the `full > > These can be avoided using shared storage, for example mounting an NFS on the local path, or using S3. With network storage, every node can automatically read every SST file, so these caveats no longer apply. > -> Also, note that you can only run one restore operation for a single cluster at the same time. Otherwise, unexpected circumstances might occur. For details, see [FAQ](/br/backup-and-restore-faq.md#can-i-use-multiple-br-command-lines-at-the-same-time-to-restore-the-data-of-a-single-cluster). +> Also, note that you can only run one restore operation for a single cluster at the same time. Otherwise, unexpected behaviors might occur. For details, see [FAQ](/br/backup-and-restore-faq.md#can-i-use-multiple-br-command-lines-at-the-same-time-to-restore-the-data-of-a-single-cluster). ### Restore all the backup data From b3cf3c6acf3912cb409e6f25b054543cab5cf4b2 Mon Sep 17 00:00:00 2001 From: Enwei Date: Thu, 2 Sep 2021 15:49:37 +0200 Subject: [PATCH 5/6] Update br/use-br-command-line-tool.md --- br/use-br-command-line-tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/use-br-command-line-tool.md b/br/use-br-command-line-tool.md index 136e38d10bb54..1f3955516cbd9 100644 --- a/br/use-br-command-line-tool.md +++ b/br/use-br-command-line-tool.md @@ -308,7 +308,7 @@ To restore the cluster data, use the `br restore` command. You can add the `full > > These can be avoided using shared storage, for example mounting an NFS on the local path, or using S3. With network storage, every node can automatically read every SST file, so these caveats no longer apply. > -> Also, note that you can only run one restore operation for a single cluster at the same time. Otherwise, unexpected behaviors might occur. For details, see [FAQ](/br/backup-and-restore-faq.md#can-i-use-multiple-br-command-lines-at-the-same-time-to-restore-the-data-of-a-single-cluster). +> Also, note that you can only run one restore operation for a single cluster at the same time. Otherwise, unexpected behaviors might occur. For details, see [FAQ](/br/backup-and-restore-faq.md#can-i-use-multiple-br-processes-at-the-same-time-to-restore-the-data-of-a-single-cluster). ### Restore all the backup data From 62c5fd21fb73a03560a8d3636573bca4fc8aeb99 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 8 Sep 2021 16:44:26 +0800 Subject: [PATCH 6/6] Update br/backup-and-restore-faq.md --- br/backup-and-restore-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/backup-and-restore-faq.md b/br/backup-and-restore-faq.md index 2d981028ac2ea..f48570db71840 100644 --- a/br/backup-and-restore-faq.md +++ b/br/backup-and-restore-faq.md @@ -100,6 +100,6 @@ If you do not execute `ANALYZE` on the table, TiDB will fail to select the optim **It is strongly not recommended** to use multiple BR processes at the same time to restore the data of a single cluster for the following reasons: -+ When BR restores data, it modifies some of the global configurations of PD. Therefore, if you use multiple BR processes for data restore at the same time, these configurations might be mistakenly overwritten and cause abnormal cluster status. ++ When BR restores data, it modifies some global configurations of PD. Therefore, if you use multiple BR processes for data restore at the same time, these configurations might be mistakenly overwritten and cause abnormal cluster status. + BR consumes a lot of cluster resources to restore data, so in fact, running BR processes in parallel improves the restore speed only to a limited extent. + There has been no test for running multiple BR processes in parallel for data restore, so it is not guaranteed to succeed. \ No newline at end of file