diff --git a/TOC.md b/TOC.md index ef170953365c9..d6fd60c0ee9ed 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) 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..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/'] +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