From 4d02bbe7399acd4dd1802fbfce53d53f82752816 Mon Sep 17 00:00:00 2001 From: toutdesuite Date: Tue, 16 Jun 2020 17:47:49 +0800 Subject: [PATCH 1/2] cherry pick #2814 to release-4.0 Signed-off-by: ti-srebot --- TOC.md | 12 +++++------- daily-check.md | 2 +- ticdc/ticdc-overview.md | 4 ++++ ticdc/troubleshoot-ticdc.md | 6 +++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/TOC.md b/TOC.md index 45acf58c23d64..c2f06821fefd2 100644 --- a/TOC.md +++ b/TOC.md @@ -67,7 +67,7 @@ + [BR Use Cases](/br/backup-and-restore-use-cases.md) + [BR storages](/br/backup-and-restore-storages.md) + [Daily Checklist](/daily-check.md) - + [Maintain TiCDC](/ticdc/manage-ticdc.md) + + [Manage TiCDC Cluster and Replication Tasks](/ticdc/manage-ticdc.md) + [Maintain TiFlash](/tiflash/maintain-tiflash.md) + [Maintain TiDB Using TiUP](/maintain-tidb-using-tiup.md) + [Maintain TiDB Using Ansible](/maintain-tidb-using-ansible.md) @@ -82,7 +82,7 @@ + [Statement Summary Tables](/statement-summary-tables.md) + [Troubleshoot Cluster Setup](/troubleshoot-tidb-cluster.md) + [TiDB Troubleshooting Map](/tidb-troubleshooting-map.md) - + [Handle TiCDC Issues](/ticdc/troubleshoot-ticdc.md) + + [Troubleshoot TiCDC](/ticdc/troubleshoot-ticdc.md) + [Troubleshoot TiFlash](/tiflash/troubleshoot-tiflash.md) + Performance Tuning + Software Tuning @@ -154,11 +154,7 @@ + [Troubleshoot](/troubleshoot-tidb-lightning.md) + [FAQ](/tidb-lightning/tidb-lightning-faq.md) + [Glossary](/tidb-lightning/tidb-lightning-glossary.md) - + TiCDC - + [Overview](/ticdc/ticdc-overview.md) - + [Configure Sink URI](/ticdc/sink-url.md) - + [TiCDC Open Protocol](/ticdc/ticdc-open-protocol.md) - + [Column and DDL Type Codes](/ticdc/column-ddl-type-codes.md) + + [TiCDC](/ticdc/ticdc-overview.md) + sync-diff-inspector + [Overview](/sync-diff-inspector/sync-diff-inspector-overview.md) + [Data Check for Tables with Different Schema/Table Names](/sync-diff-inspector/route-diff.md) @@ -399,6 +395,8 @@ + [tiup-mirror](/tiup/tiup-mirrors.md) + [tiup-bench](/tiup/tiup-bench.md) + [Errors Codes](/error-codes.md) + + [TiCDC Overview](/ticdc/ticdc-overview.md) + + [TiCDC Open Protocol](/ticdc/ticdc-open-protocol.md) + FAQs + [TiDB FAQs](/faq/tidb-faq.md) + [TiDB Lightning FAQs](/tidb-lightning/tidb-lightning-faq.md) diff --git a/daily-check.md b/daily-check.md index 314cb7310a99e..c118ebd015515 100644 --- a/daily-check.md +++ b/daily-check.md @@ -26,7 +26,7 @@ TiDB Dashboard simplifies the operation and maintenance of the TiDB database. Yo ![Host panel](/media/host-panel.png) -You can view the usage of CPU, memory, and disk. When the average usage of any resource exceeds 60%, it is recommended to plan to scale out the capacity. When the average usage reaches 80%, it is recommended to scale out the capacity. +You can view the usage of CPU, memory, and disk. When the usage of any resource exceeds 80%, it is recommended to scale out the capacity accordingly. ### SQL analysis panel diff --git a/ticdc/ticdc-overview.md b/ticdc/ticdc-overview.md index b5cecfee04bd3..72eddd60de58e 100644 --- a/ticdc/ticdc-overview.md +++ b/ticdc/ticdc-overview.md @@ -67,6 +67,10 @@ Currently, The following scenarios are not supported: For details, see [Manage TiCDC Cluster and Replication Tasks](/ticdc/manage-ticdc.md). +## Troubleshoot TiCDC + +For details, refer to [Troubleshoot TiCDC](/ticdc/troubleshoot-ticdc.md). + ## TiCDC Open Protocol TiCDC Open Protocol is a row-level data change notification protocol that provides data sources for monitoring, caching, full-text indexing, analysis engines, and master-slave replication between different databases. TiCDC complies with TiCDC Open Protocol and replicates data changes of TiDB to third-party data medium such as MQ (Message Queue). For more information, see [TiCDC Open Protocol](/ticdc/ticdc-open-protocol.md). diff --git a/ticdc/troubleshoot-ticdc.md b/ticdc/troubleshoot-ticdc.md index 1dc3bab63e7c2..995075c931038 100644 --- a/ticdc/troubleshoot-ticdc.md +++ b/ticdc/troubleshoot-ticdc.md @@ -1,10 +1,10 @@ --- -title: Handle TiCDC Issues -summary: Learn how to handle TiCDC issues. +title: Troubleshoot TiCDC +summary: Learn how to troubleshoot issues you might encounter when you use TiCDC. category: reference --- -# Handle TiCDC Issues +# Troubleshoot TiCDC This document introduces the common issues and errors that you might encounter when using TiCDC, and the corresponding maintenance and troubleshooting methods. From 3c0c93ecc092988e4bf795a169ece0e959fd4f45 Mon Sep 17 00:00:00 2001 From: toutdesuite Date: Tue, 16 Jun 2020 20:09:38 +0800 Subject: [PATCH 2/2] remove outdated files --- ticdc/column-ddl-type-codes.md | 84 ---------------------------------- ticdc/sink-url.md | 59 ------------------------ 2 files changed, 143 deletions(-) delete mode 100644 ticdc/column-ddl-type-codes.md delete mode 100644 ticdc/sink-url.md diff --git a/ticdc/column-ddl-type-codes.md b/ticdc/column-ddl-type-codes.md deleted file mode 100644 index 00795253db780..0000000000000 --- a/ticdc/column-ddl-type-codes.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Column and DDL Type Codes -summary: Learn the column and DDL type codes. -category: reference -aliases: ['/docs/stable/reference/tools/ticdc/column-ddl-type/'] ---- - -# Column and DDL Type Codes - -The column and DDL type codes are encodings defined by [TiCDC Open Protocol](/ticdc/ticdc-open-protocol.md). The column type code identifies the column data type in Row Changed Events. The DDL type code identifies the DDL statement type in DDL Events. - -## Column Type Code - -| Type | Code | Output example | Note | -| :---------- | :--- | :------ | :-- | -| Decimal | 0 | {"t":0,"v":"129012.1230000"} | | -| Tiny/Bool | 1 | {"t":1,"v":1} | | -| Short | 2 | {"t":2,"v":1} | | -| Long | 3 | {"t":3,"v":123} | | -| Float | 4 | {"t":4,"v":153.123} | | -| Double | 5 | {"t":5,"v":153.123} | | -| Null | 6 | {"t":6,"v":null} | | -| Timestamp | 7 | {"t":7,"v":"1973-12-30 15:30:00"} | | -| Longlong | 8 | {"t":8,"v":123} | | -| Int24 | 9 | {"t":9,"v":123} | | -| Date | 10 | {"t":10,"v":"2000-01-01"} | | -| Duration | 11 | {"t":11,"v":"23:59:59"} | | -| Datetime | 12 | {"t":12,"v":"2015-12-20 23:58:58"} | | -| Year | 13 | {"t":13,"v":1970} | | -| New Date | 14 | {"t":14,"v":"2000-01-01"} | | -| Varchar | 15 | {"t":15,"v":"test"} | The value is encoded in UTF-8. | -| Bit | 16 | {"t":16,"v":81} | | -| JSON | 245 | {"t":245,"v":"{\\"key1\\": \\"value1\\"}"} | | -| New Decimal | 246 | {"t":246,"v":"129012.1230000"} | | -| Enum | 247 | {"t":247,"v":1} | | -| Set | 248 | {"t":248,"v":3} | | -| Tiny Blob | 249 | {"t":249,"v":"5rWL6K+VdGV4dA=="} | The value is encoded in Base64. | -| Medium Blob | 250 | {"t":250,"v":"5rWL6K+VdGV4dA=="} | The value is encoded in Base64. | -| Long Blob | 251 | {"t":251,"v":"5rWL6K+VdGV4dA=="} | The value is encoded in Base64. | -| Blob | 252 | {"t":252,"v":"5rWL6K+VdGV4dA=="} | The value is encoded in Base64. | -| Var String | 253 | {"t":253,"v":"test"} | The value is encoded in UTF-8. | -| String | 254 | {"t":254,"v":"test"} | The value is encoded in UTF-8. | -| Geometry | 255 | | Unsupported type | - -## DDL Type Code - -| Type | Code | -| :-------------------------------- | :- | -| Create Schema | 1 | -| Drop Schema | 2 | -| Create Table | 3 | -| Drop Table | 4 | -| Add Column | 5 | -| Drop Column | 6 | -| Add Index | 7 | -| Drop Index | 8 | -| Add Foreign Key | 9 | -| Drop Foreign Key | 10 | -| Truncate Table | 11 | -| Modify Column | 12 | -| Rebase Auto ID | 13 | -| Rename Table | 14 | -| Set Default Value | 15 | -| Shard RowID | 16 | -| Modify Table Comment | 17 | -| Rename Index | 18 | -| Add Table Partition | 19 | -| Drop Table Partition | 20 | -| Create View | 21 | -| Modify Table Charset And Collate | 22 | -| Truncate Table Partition | 23 | -| Drop View | 24 | -| Recover Table | 25 | -| Modify Schema Charset And Collate | 26 | -| Lock Table | 27 | -| Unlock Table | 28 | -| Repair Table | 29 | -| Set TiFlash Replica | 30 | -| Update TiFlash Replica Status | 31 | -| Add Primary Key | 32 | -| Drop Primary Key | 33 | -| Create Sequence | 34 | -| Alter Sequence | 35 | -| Drop Sequence | 36 | diff --git a/ticdc/sink-url.md b/ticdc/sink-url.md deleted file mode 100644 index 189118b8d15dd..0000000000000 --- a/ticdc/sink-url.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: Configure Sink URI -summary: Learn how to configure sink URI. -category: reference -aliases: ['/docs/stable/reference/tools/ticdc/sink/'] ---- - -# Configure Sink URI - -You need to configure sink URI in the following format. Currently, the `scheme` supports `mysql`, `tidb`, and `kafka`. - -{{< copyable "" >}} - -``` -[scheme]://[userinfo@][host]:[port][/path]?[query_parameters] -``` - -## Configure sink URI with `mysql` or `tidb` - -The following command is a configuration example: - -{{< copyable "shell-regular" >}} - -```shell ---sink-uri="mysql://root:123456@127.0.0.1:3306/?worker-count=16&max-txn-row=5000" -``` - -The parameters in the above command are described as follows: - -| Parameter | Description | -| :------------ | :------------------------------------------------ | -| `root` | The username of the downstream database | -| `123456` | The password of the downstream database | -| `127.0.0.1` | The IP of the downstream database | -| `3306` | The port of the downstream database | -| `worker-count` | The number of SQL statements that can be concurrently executed to the downstream (optional, `16` by default) | -| `max-txn-row` | The size of a transaction batch that can be executed to the downstream (optional, `256` by default) | - -## Configure sink URI with `kafka` - -The following command is an configuration example: - -{{< copyable "shell-regular" >}} - -```shell ---sink-uri="kafka://127.0.0.1:9092/cdc-test?kafka-version=2.4.0&partition-num=6&max-message-bytes=67108864&replication-factor=1" -``` - -The parameters in the above command are described as follows: - -| Parameter | Description | -| :------------------ | :------------------------------------------------------------ | -| `127.0.0.1` | The IP of downstream Kafka services | -| `9092` | The port of downstream Kafka | -| `cdc-test` | The name of the Kafka topic | -| `kafka-version` | The version of downstream Kafka (optional, `2.4.0` by default) | -| `partition-num` | The number of downstream Kafka partitions (optional. The value must be **no greater than** the actual number of partitions. If you do not configure this parameter, the partition number will be obtained automatically.) | -| `max-message-bytes` | The maximum size of data that is sent to Kafka broker each time (optional, `64MB` by default) | -| `replication-factor` | The number of Kafka message replicas that can be saved (optional, `1` by default) |