From cd30ef8881d7b7d0c7644e784890c3cab4e35fe2 Mon Sep 17 00:00:00 2001 From: yikeke Date: Tue, 28 Jul 2020 12:59:37 +0800 Subject: [PATCH 1/4] align https://github.com/pingcap/docs-cn/pull/3981 --- TOC.md | 1 + check-cluster-status-using-sql-statements.md | 28 --------------- .../information-schema-sql-diagnostics.md | 2 +- .../tidb-lightning-misuse-handling.md | 36 ------------------- troubleshoot-tidb-lightning.md | 2 +- 5 files changed, 3 insertions(+), 66 deletions(-) delete mode 100644 check-cluster-status-using-sql-statements.md delete mode 100644 tidb-lightning/tidb-lightning-misuse-handling.md diff --git a/TOC.md b/TOC.md index 18f53440bc625..b64d39e24f9ec 100644 --- a/TOC.md +++ b/TOC.md @@ -496,6 +496,7 @@ + [Migration FAQs](/faq/migration-tidb-faq.md) + [Glossary](/glossary.md) + Release Notes + + [TiDB V4.0 Roadmap](/roadmap.md) + [All Releases](/releases/release-notes.md) + v4.0 + [4.0.3](/releases/release-4.0.3.md) diff --git a/check-cluster-status-using-sql-statements.md b/check-cluster-status-using-sql-statements.md deleted file mode 100644 index fc4342cc3b5c7..0000000000000 --- a/check-cluster-status-using-sql-statements.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Check the TiDB Cluster Status Using SQL Statements -summary: This document introduces that TiDB offers some SQL statements and system tables to check the TiDB cluster status. -aliases: ['/docs/dev/check-cluster-status-using-sql-statements/','/docs/dev/reference/performance/check-cluster-status-using-sql-statements/'] ---- - -# Check the TiDB Cluster Status Using SQL Statements - -TiDB offers some SQL statements and system tables to check the TiDB cluster status. - -The `INFORMATION_SCHEMA` system database offers system tables as follows to query the cluster status and diagnose common cluster issues: - -- [`TABLES`](/information-schema/information-schema-tables.md) -- [`TIDB_INDEXES`](/information-schema/information-schema-tidb-indexes.md) -- [`ANALYZE_STATUS`](/information-schema/information-schema-analyze-status.md) -- [`TIDB_HOT_REGIONS`](/information-schema/information-schema-tidb-hot-regions.md) -- [`TIKV_STORE_STATUS`](/information-schema/information-schema-tikv-store-status.md) -- [`TIKV_REGION_STATUS`](/information-schema/information-schema-tikv-region-status.md) -- [`TIKV_REGION_PEERS`](/information-schema/information-schema-tikv-region-peers.md) - -You can also use the following statements to obtain some useful information for troubleshooting and querying the TiDB cluster status. - -- `ADMIN SHOW DDL`: obtains the ID of TiDB with the `DDL owner` role and `IP:PORT`. -- The feature of `SHOW ANALYZE STATUS` is the same with that of [the `ANALYZE_STATUS` table](/information-schema/information-schema-analyze-status.md). -- Specific `EXPLAIN` statements - - `EXPLAIN ANALYZE`: obtains some detailed information for execution of a SQL statement. - - `EXPLAIN FOR CONNECTION`: obtains the execution plan for the query executed last in a connection. Can be used along with `SHOW PROCESSLIST`. - - For more information about `EXPLAIN`, see [Understand the Query Execution Plan](/query-execution-plan.md). diff --git a/information-schema/information-schema-sql-diagnostics.md b/information-schema/information-schema-sql-diagnostics.md index 1ed93ba55ded7..a7e62a8e34dd5 100644 --- a/information-schema/information-schema-sql-diagnostics.md +++ b/information-schema/information-schema-sql-diagnostics.md @@ -1,7 +1,7 @@ --- title: SQL Diagnostics summary: Understand SQL diagnostics in TiDB. -aliases: ['/docs/dev/system-tables/system-table-sql-diagnostics/','/docs/dev/reference/system-databases/sql-diagnosis/','/docs/dev/system-tables/system-table-sql-diagnosis/','/tidb/dev/system-table-sql-diagnostics/'] +aliases: ['/docs/dev/system-tables/system-table-sql-diagnostics/','/docs/dev/reference/system-databases/sql-diagnosis/','/docs/dev/system-tables/system-table-sql-diagnosis/','/tidb/dev/system-table-sql-diagnostics/','/tidb/dev/check-cluster-status-using-sql-statements','/docs/dev/check-cluster-status-using-sql-statements/','/docs/dev/reference/performance/check-cluster-status-using-sql-statements/'] --- # SQL Diagnostics diff --git a/tidb-lightning/tidb-lightning-misuse-handling.md b/tidb-lightning/tidb-lightning-misuse-handling.md deleted file mode 100644 index 41aae1c80de80..0000000000000 --- a/tidb-lightning/tidb-lightning-misuse-handling.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Common Misuses of TiDB Lightning -aliases: ['/docs/dev/tidb-lightning/tidb-lightning-misuse-handling/','/docs/dev/reference/tools/error-case-handling/lightning-misuse-handling/'] ---- - -# Common Misuses of TiDB Lightning - -This document introduces common error scenarios in using [TiDB Lightning](/tidb-lightning/tidb-lightning-overview.md), and also provides their reasons and solutions. - -## Error: `checksum mismatched remote vs local` - -The following error is reported during data import: - -```log -Error: checksum mismatched remote vs local => (checksum: 3828723015727756136 vs 7895534721177712659) (total_kvs: 1221416844 vs 1501500000) (total_bytes:237660308510 vs 292158203078) -``` - -### Reasons - -* TiDB Lightning was used to import data previously, and the corresponding [`checkpoint`](/tidb-lightning/tidb-lightning-checkpoints.md) data was not cleaned up. To confirm this, you can check the log at the first launch of TiDB Lightning: - - * When `[checkpoint] driver = file`, if the log that marks the beginning of data import using TiDB Lightning shows `open checkpoint file failed, going to create a new one`, then the `checkpoint` is cleaned correctly. Otherwise, the remaining data might lead to imported data missing. - * When `[checkpoint] driver = mysql`, you can run `curl http://{TiDBIP}:10080/schema/{checkpoint.schema}/{checkpoint.table}` through TiDB API to query the creation time of `checkpoint table`. Then you can confirm whether the `checkpoint` is cleaned correctly. - -* There is conflicting data from the data source imported by TiDB Lightning. - * Data in different rows have the same primary key or unique key. - -### Solutions - -* Delete data from tables with `checksum mismatch` error. - - ``` - tidb-lightning-ctl --config conf/tidb-lightning.toml --checkpoint-error-destroy=all - ``` - -* Find a way to detect whether there is conflicting data in the data source. TiDB Lightning generally processes large amounts of data, so currently there is no effective conflict detection mechanism or solution yet. \ No newline at end of file diff --git a/troubleshoot-tidb-lightning.md b/troubleshoot-tidb-lightning.md index 7834fa517b3ff..c0e6fb76a3f5c 100644 --- a/troubleshoot-tidb-lightning.md +++ b/troubleshoot-tidb-lightning.md @@ -1,7 +1,7 @@ --- title: TiDB Lightning Troubleshooting summary: Learn about common errors and solutions of TiDB Lightning. -aliases: ['/docs/dev/troubleshoot-tidb-lightning/','/docs/dev/how-to/troubleshoot/tidb-lightning/'] +aliases: ['/docs/dev/troubleshoot-tidb-lightning/','/docs/dev/how-to/troubleshoot/tidb-lightning/','/docs/dev/tidb-lightning/tidb-lightning-misuse-handling/','/docs/dev/reference/tools/error-case-handling/lightning-misuse-handling/'] --- # TiDB Lightning Troubleshooting From c8b45ca5794de444cc5e56b2d11fa6d1a46c98f3 Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Tue, 28 Jul 2020 13:06:42 +0800 Subject: [PATCH 2/4] Update troubleshoot-tidb-lightning.md --- troubleshoot-tidb-lightning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/troubleshoot-tidb-lightning.md b/troubleshoot-tidb-lightning.md index c0e6fb76a3f5c..3ab8ce0286bb5 100644 --- a/troubleshoot-tidb-lightning.md +++ b/troubleshoot-tidb-lightning.md @@ -1,7 +1,7 @@ --- title: TiDB Lightning Troubleshooting summary: Learn about common errors and solutions of TiDB Lightning. -aliases: ['/docs/dev/troubleshoot-tidb-lightning/','/docs/dev/how-to/troubleshoot/tidb-lightning/','/docs/dev/tidb-lightning/tidb-lightning-misuse-handling/','/docs/dev/reference/tools/error-case-handling/lightning-misuse-handling/'] +aliases: ['/docs/dev/troubleshoot-tidb-lightning/','/docs/dev/how-to/troubleshoot/tidb-lightning/','/docs/dev/tidb-lightning/tidb-lightning-misuse-handling/','/docs/dev/reference/tools/error-case-handling/lightning-misuse-handling/','/tidb/dev/tidb-lightning-misuse-handling'] --- # TiDB Lightning Troubleshooting From 1bc1ccb5617a2a006e49d0f32ed923dabd9244a7 Mon Sep 17 00:00:00 2001 From: yikeke Date: Thu, 30 Jul 2020 11:08:56 +0800 Subject: [PATCH 3/4] add import-example-data.md --- TOC.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TOC.md b/TOC.md index b64d39e24f9ec..eda7d1ab3a357 100644 --- a/TOC.md +++ b/TOC.md @@ -14,6 +14,7 @@ + Quick Start + [Try Out TiDB](/quick-start-with-tidb.md) + [Learn TiDB SQL](/basic-sql-operations.md) + + [Import Example Database](/import-example-data.md) + Deploy + [Software and Hardware Requirements](/hardware-and-software-requirements.md) + [Environment Configuration Checklist](/check-before-deployment.md) From 3c086c30a0c3e50eafa13397b4d161c7d669e257 Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Fri, 31 Jul 2020 12:20:56 +0800 Subject: [PATCH 4/4] Update TOC.md --- TOC.md | 1 - 1 file changed, 1 deletion(-) diff --git a/TOC.md b/TOC.md index eda7d1ab3a357..2bf7faac1f7a4 100644 --- a/TOC.md +++ b/TOC.md @@ -497,7 +497,6 @@ + [Migration FAQs](/faq/migration-tidb-faq.md) + [Glossary](/glossary.md) + Release Notes - + [TiDB V4.0 Roadmap](/roadmap.md) + [All Releases](/releases/release-notes.md) + v4.0 + [4.0.3](/releases/release-4.0.3.md)