From 03ea1f1316e1077d10acbbb1843ba4c0112b0aac Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Fri, 14 Aug 2026 15:53:11 +0900 Subject: [PATCH 1/2] i18n(ja): restore lost code fences in 11 tidb-cloud files (batch 5, sub 2/2) data-service-manage-endpoint.md needed no fix: its EN/JA count gap is fully explained by 6 EN lines using inline triple-backtick delimiters around short path examples, which JA correctly renders with single backticks for the same content. --- tidb-cloud/changefeed-sink-to-mysql.md | 12 +++-- tidb-cloud/changefeed-sink-to-tidb-cloud.md | 12 +++-- tidb-cloud/cli-reference.md | 14 +++-- .../configure-external-storage-access.md | 18 ++++--- tidb-cloud/data-service-app-config-files.md | 52 +++++++++++-------- .../data-service-manage-github-connection.md | 22 ++++---- tidb-cloud/data-service-oas-with-nextjs.md | 6 ++- tidb-cloud/essential-changefeed-overview.md | 4 +- .../integrate-tidbcloud-with-airbyte.md | 20 +++---- .../integrate-tidbcloud-with-netlify.md | 14 ++--- tidb-cloud/integrate-tidbcloud-with-vercel.md | 18 ++++--- 11 files changed, 113 insertions(+), 79 deletions(-) diff --git a/tidb-cloud/changefeed-sink-to-mysql.md b/tidb-cloud/changefeed-sink-to-mysql.md index 4930c8fcca1f1..55d68dbaff7fb 100644 --- a/tidb-cloud/changefeed-sink-to-mysql.md +++ b/tidb-cloud/changefeed-sink-to-mysql.md @@ -115,11 +115,13 @@ TiDB Cloud PremiumインスタンスがMySQLサービスに接続できること 以下はメタデータファイルの例の一部です。 `Pos`の`SHOW MASTER STATUS`は、既存データの TSO であり、MySQL シンクの開始位置でもあります。 - Started dump at: 2020-11-10 10:40:19 - SHOW MASTER STATUS: - Log: tidb-binlog - Pos: 420747102018863124 - Finished dump at: 2020-11-10 10:40:20 + ``` + Started dump at: 2020-11-10 10:40:19 + SHOW MASTER STATUS: + Log: tidb-binlog + Pos: 420747102018863124 + Finished dump at: 2020-11-10 10:40:20 + ``` ### MySQLでターゲットテーブルを作成する {#create-target-tables-in-mysql} diff --git a/tidb-cloud/changefeed-sink-to-tidb-cloud.md b/tidb-cloud/changefeed-sink-to-tidb-cloud.md index 1ab9b0890c74f..b18206fb6402c 100644 --- a/tidb-cloud/changefeed-sink-to-tidb-cloud.md +++ b/tidb-cloud/changefeed-sink-to-tidb-cloud.md @@ -53,11 +53,13 @@ summary: このドキュメントでは、TiDB Cloud Dedicatedクラスタから 以下はメタデータファイルの例の一部です。 `Pos`の`SHOW MASTER STATUS`は、既存データの TSO であり、 TiDB Cloudシンクの開始位置でもあります。 - Started dump at: 2023-03-28 10:40:19 - SHOW MASTER STATUS: - Log: tidb-binlog - Pos: 420747102018863124 - Finished dump at: 2023-03-28 10:40:20 + ``` + Started dump at: 2023-03-28 10:40:19 + SHOW MASTER STATUS: + Log: tidb-binlog + Pos: 420747102018863124 + Finished dump at: 2023-03-28 10:40:20 + ``` ## TiDB Cloudシンクを作成する {#create-a-tidb-cloud-sink} diff --git a/tidb-cloud/cli-reference.md b/tidb-cloud/cli-reference.md index 63309d4fd6d21..7d83dc026d8bf 100644 --- a/tidb-cloud/cli-reference.md +++ b/tidb-cloud/cli-reference.md @@ -70,10 +70,12 @@ TiDB Cloud CLI では、ユーザープロファイルとは、プロファイ 出力例は以下のとおりです。 - Profile Name - default (active) - dev - staging +``` +Profile Name +default (active) +dev +staging +``` この出力例では、ユーザープロファイル`default`が現在アクティブです。 @@ -100,7 +102,9 @@ TiDB Cloud CLI では、ユーザープロファイルとは、プロファイ 出力例は以下のとおりです。 - Current profile has been changed to default +``` +Current profile has been changed to default +``` ### 設定ファイルを編集する {#edit-the-config-file} diff --git a/tidb-cloud/configure-external-storage-access.md b/tidb-cloud/configure-external-storage-access.md index 4053d0249c8ee..4a9549dd40bf9 100644 --- a/tidb-cloud/configure-external-storage-access.md +++ b/tidb-cloud/configure-external-storage-access.md @@ -137,14 +137,16 @@ AWS CloudFormationでロールARNを作成する際に問題が発生した場 - AWS Key Management Service キー (SSE-KMS) を顧客管理キー暗号化で有効にしている場合は、ポリシーに次の設定が含まれていることを確認してください。 `"arn:aws:kms:ap-northeast-1:105880447796:key/c3046e91-fdfc-4f3a-acff-00597dd3801f"`は、バケットの KMS キーの例です。 - { - "Sid": "AllowKMSkey", - "Effect": "Allow", - "Action": [ - "kms:Decrypt" - ], - "Resource": "arn:aws:kms:ap-northeast-1:105880447796:key/c3046e91-fdfc-4f3a-acff-00597dd3801f" - } + ``` + { + "Sid": "AllowKMSkey", + "Effect": "Allow", + "Action": [ + "kms:Decrypt" + ], + "Resource": "arn:aws:kms:ap-northeast-1:105880447796:key/c3046e91-fdfc-4f3a-acff-00597dd3801f" + } + ``` - バケット内のオブジェクトが別の暗号化されたバケットからコピーされた場合、KMS キー値には両方のバケットのキーを含める必要があります。たとえば、 `"Resource": ["arn:aws:kms:ap-northeast-1:105880447796:key/c3046e91-fdfc-4f3a-acff-00597dd3801f","arn:aws:kms:ap-northeast-1:495580073302:key/0d7926a7-6ecc-4bf7-a9c1-a38f0faec0cd"]`のようになります。 diff --git a/tidb-cloud/data-service-app-config-files.md b/tidb-cloud/data-service-app-config-files.md index 712550569ed7a..09b56c165fab0 100644 --- a/tidb-cloud/data-service-app-config-files.md +++ b/tidb-cloud/data-service-app-config-files.md @@ -9,24 +9,28 @@ summary: このドキュメントでは、TiDB Cloudのデータ アプリの構 データ[データアプリをGitHubに接続しました](/tidb-cloud/data-service-manage-github-connection.md)た場合は、次のように GitHub の指定したディレクトリでデータアプリの構成ファイルを見つけることができます。 - ├── - │ ├── data_sources - │ │ └── cluster.json - │ ├── dataapp_config.json - │ ├── http_endpoints - │ │ ├── config.json - │ │ └── sql - │ │ ├── -.sql - │ │ ├── -.sql - │ │ └── -.sql +``` +├── +│ ├── data_sources +│ │ └── cluster.json +│ ├── dataapp_config.json +│ ├── http_endpoints +│ │ ├── config.json +│ │ └── sql +│ │ ├── -.sql +│ │ ├── -.sql +│ │ └── -.sql +``` ## データソース構成 {#data-source-configuration} データアプリのデータソースは、リンクされた TiDB クラスターから取得されます。データソースの設定は`data_sources/cluster.json`で確認できます。 - ├── - │ ├── data_sources - │ │ └── cluster.json +``` +├── +│ ├── data_sources +│ │ └── cluster.json +``` 各データアプリは、1つまたは複数のTiDBクラスターにリンクできます。 @@ -53,8 +57,10 @@ summary: このドキュメントでは、TiDB Cloudのデータ アプリの構 データアプリのプロパティには、アプリID、名前、およびタイプが含まれます。これらのプロパティは`dataapp_config.json`ファイルで確認できます。 - ├── - │ ├── dataapp_config.json +``` +├── +│ ├── dataapp_config.json +``` 以下は`dataapp_config.json`の構成例です。 @@ -82,13 +88,15 @@ summary: このドキュメントでは、TiDB Cloudのデータ アプリの構 データアプリのディレクトリには、 `http_endpoints/config.json`にエンドポイント構成があり、 `http_endpoints/sql/-.sql`に SQL ファイルが見つかります。 - ├── - │ ├── http_endpoints - │ │ ├── config.json - │ │ └── sql - │ │ ├── -.sql - │ │ ├── -.sql - │ │ └── -.sql +``` +├── +│ ├── http_endpoints +│ │ ├── config.json +│ │ └── sql +│ │ ├── -.sql +│ │ ├── -.sql +│ │ └── -.sql +``` ### エンドポイント構成 {#endpoint-configuration} diff --git a/tidb-cloud/data-service-manage-github-connection.md b/tidb-cloud/data-service-manage-github-connection.md index 40780b8e82da6..57d267e98be91 100644 --- a/tidb-cloud/data-service-manage-github-connection.md +++ b/tidb-cloud/data-service-manage-github-connection.md @@ -65,16 +65,18 @@ GitHub接続で**自動同期とデプロイが**有効になっている場合 デプロイ操作後、指定したGitHubディレクトリを確認してください。 `tidb-cloud-data-service`によってData Appの設定ファイルがディレクトリにコミットされていることが確認できます。これは、Data AppがGitHubに正常に接続されたことを意味します。ディレクトリ構造は以下のとおりです。 - ├── - │ ├── data_sources - │ │ └── cluster.json # specifies the linked TiDB Cloud Starter instances or TiDB Cloud Dedicated clusters. - │ ├── dataapp_config.json # specifies the Data APP ID, name, type, version, and description. - │ ├── http_endpoints - │ │ ├── config.json # specifies the endpoints. - │ │ └── sql # contains SQL files of the endpoints. - │ │ ├── -.sql - │ │ ├── -.sql - │ │ └── -.sql +``` +├── +│ ├── data_sources +│ │ └── cluster.json # specifies the linked TiDB Cloud Starter instances or TiDB Cloud Dedicated clusters. +│ ├── dataapp_config.json # specifies the Data APP ID, name, type, version, and description. +│ ├── http_endpoints +│ │ ├── config.json # specifies the endpoints. +│ │ └── sql # contains SQL files of the endpoints. +│ │ ├── -.sql +│ │ ├── -.sql +│ │ └── -.sql +``` ## ステップ3.データアプリを変更する {#step-3-modify-your-data-app} diff --git a/tidb-cloud/data-service-oas-with-nextjs.md b/tidb-cloud/data-service-oas-with-nextjs.md index 4c7a88c112ba9..a063f6d65e941 100644 --- a/tidb-cloud/data-service-oas-with-nextjs.md +++ b/tidb-cloud/data-service-oas-with-nextjs.md @@ -147,8 +147,10 @@ SELECT * FROM test.repository; 1. `hello-repos`プロジェクトディレクトリに、次の変数を含む`.env.local`ファイルを作成し、変数の値をデータアプリの公開鍵と秘密鍵に設定します。 - TIDBCLOUD_DATA_SERVICE_PUBLIC_KEY=YOUR_PUBLIC_KEY - TIDBCLOUD_DATA_SERVICE_PRIVATE_KEY=YOUR_PRIVATE_KEY + ``` + TIDBCLOUD_DATA_SERVICE_PUBLIC_KEY=YOUR_PUBLIC_KEY + TIDBCLOUD_DATA_SERVICE_PRIVATE_KEY=YOUR_PRIVATE_KEY + ``` データ アプリの API キーを作成するには、 [APIキーを作成する](/tidb-cloud/data-service-api-key.md#create-an-api-key)を参照してください。 diff --git a/tidb-cloud/essential-changefeed-overview.md b/tidb-cloud/essential-changefeed-overview.md index bdcb437e572fe..cfbdb7ee80033 100644 --- a/tidb-cloud/essential-changefeed-overview.md +++ b/tidb-cloud/essential-changefeed-overview.md @@ -101,7 +101,9 @@ ticloud serverless changefeed pause --cluster-id --changefeed-id --changefeed-id +``` +ticloud serverless changefeed resume -c --changefeed-id +``` diff --git a/tidb-cloud/integrate-tidbcloud-with-airbyte.md b/tidb-cloud/integrate-tidbcloud-with-airbyte.md index 750acb96c28e5..9420b2dd8243c 100644 --- a/tidb-cloud/integrate-tidbcloud-with-airbyte.md +++ b/tidb-cloud/integrate-tidbcloud-with-airbyte.md @@ -28,15 +28,17 @@ Airbyteは、わずか数ステップでローカル環境にデプロイでき Airbyteのバナーが表示されたら、ユーザー名( `airbyte` )とパスワード(`password`)を使用して[http://localhost:8000](http://localhost:8000) `password`アクセスし、UIにアクセスできます。 - airbyte-server | ___ _ __ __ - airbyte-server | / | (_)____/ /_ __ __/ /____ - airbyte-server | / /| | / / ___/ __ \/ / / / __/ _ \ - airbyte-server | / ___ |/ / / / /_/ / /_/ / /_/ __/ - airbyte-server | /_/ |_/_/_/ /_.___/\__, /\__/\___/ - airbyte-server | /____/ - airbyte-server | -------------------------------------- - airbyte-server | Now ready at http://localhost:8000/ - airbyte-server | -------------------------------------- +``` +airbyte-server | ___ _ __ __ +airbyte-server | / | (_)____/ /_ __ __/ /____ +airbyte-server | / /| | / / ___/ __ \/ / / / __/ _ \ +airbyte-server | / ___ |/ / / / /_/ / /_/ / /_/ __/ +airbyte-server | /_/ |_/_/_/ /_.___/\__, /\__/\___/ +airbyte-server | /____/ +airbyte-server | -------------------------------------- +airbyte-server | Now ready at http://localhost:8000/ +airbyte-server | -------------------------------------- +``` ## TiDBコネクタを設定する {#set-up-the-tidb-connector} diff --git a/tidb-cloud/integrate-tidbcloud-with-netlify.md b/tidb-cloud/integrate-tidbcloud-with-netlify.md index e246589b38c39..f4a2002257e3e 100644 --- a/tidb-cloud/integrate-tidbcloud-with-netlify.md +++ b/tidb-cloud/integrate-tidbcloud-with-netlify.md @@ -71,12 +71,14 @@ TiDB Cloud Dedicatedクラスタの場合、接続文字列はTiDB Cloudコン 2. プロンプトに従って、 TiDB Cloud StarterまたはTiDB Cloud Essentialインスタンス、クライアント、およびオペレーティングシステムを選択してください。なお、このドキュメントで使用されているクライアントは`Prisma`です。 - Choose the cluster - > [x] Cluster0(13796194496) - Choose the client - > [x] Prisma - Choose the operating system - > [x] macOS/Alpine (Detected) + ``` + Choose the cluster + > [x] Cluster0(13796194496) + Choose the client + > [x] Prisma + Choose the operating system + > [x] macOS/Alpine (Detected) + ``` 出力は以下のとおりです。 `url`の値の中に Prisma の接続文字列があります。 diff --git a/tidb-cloud/integrate-tidbcloud-with-vercel.md b/tidb-cloud/integrate-tidbcloud-with-vercel.md index 2c3981875e06e..400055f75067d 100644 --- a/tidb-cloud/integrate-tidbcloud-with-vercel.md +++ b/tidb-cloud/integrate-tidbcloud-with-vercel.md @@ -113,11 +113,15 @@ TiDB Cloud Vercel 統合経由で接続するには、 [Vercelの統合マーケ **Prisma** - DATABASE_URL + ``` + DATABASE_URL + ``` **TiDB Cloud Serverless Driver** - DATABASE_URL + ``` + DATABASE_URL + ``` @@ -226,10 +230,12 @@ Gitリポジトリに変更をプッシュすると、Vercelがプレビュー ここでは例として、PrismaアプリケーションとTiDB Cloud Starterインスタンスを使用します。以下は、 TiDB Cloud StarterインスタンスのPrismaスキーマファイルにおけるデータソース設定です。 - datasource db { - provider = "mysql" - url = env("DATABASE_URL") - } +``` +datasource db { + provider = "mysql" + url = env("DATABASE_URL") +} +``` Vercelでは、環境変数を次のように宣言できます。 From 3da46d2501135da08feba46d1b0e5307822b007d Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Fri, 14 Aug 2026 15:55:43 +0900 Subject: [PATCH 2/2] i18n(ja): restore lost code fences in 13 files (batch 5, sub 1/2) Also fixes 3 pre-existing indentation mismatches found during verification in ticdc-sink-to-kafka.md (already-fenced --sink-uri examples using 4-space indent instead of EN's 2-space, unrelated to the lost-fence blocks this batch restored on the same file). --- system-variables.md | 102 ++++++++++++---------- ticdc/ticdc-bidirectional-replication.md | 20 +++-- ticdc/ticdc-canal-json.md | 68 ++++++++------- ticdc/ticdc-changefeed-config.md | 4 +- ticdc/ticdc-classic-architecture.md | 30 ++++--- ticdc/ticdc-csv.md | 16 ++-- ticdc/ticdc-faq.md | 4 +- ticdc/ticdc-integrity-check.md | 14 +-- ticdc/ticdc-sink-to-cloud-storage.md | 4 +- ticdc/ticdc-sink-to-kafka.md | 22 +++-- ticdc/ticdc-sink-to-mysql.md | 4 +- ticdc/ticdc-storage-consumer-dev-guide.md | 34 ++++---- ticdc/troubleshoot-ticdc.md | 26 +++--- 13 files changed, 195 insertions(+), 153 deletions(-) diff --git a/system-variables.md b/system-variables.md index 40f587a0adba0..b08b1214f7020 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1198,51 +1198,51 @@ MPP は、 TiFlashエンジンによって提供される分散コンピュー - 指定可能な値: "json,blob,mediumblob,longblob,text,mediumtext,longtext" - この変数は、統計情報を収集するために`ANALYZE`コマンドを実行する際に、統計収集からスキップされる列の種類を制御します。この変数は`tidb_analyze_version = 2`にのみ適用されます。 `ANALYZE TABLE t COLUMNS c1, ... , cn`を使用して列を指定した場合でも、その列の型が`tidb_analyze_skip_column_types`に含まれる場合は、指定された列の統計情報は収集されません。 - - - mysql> SHOW CREATE TABLE t; - +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Table | Create Table | - +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | t | CREATE TABLE `t` ( - `a` int DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` json DEFAULT NULL, - `d` blob DEFAULT NULL, - `e` longblob DEFAULT NULL - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin | - +-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - 1 row in set (0.00 sec) - - mysql> SELECT @@tidb_analyze_skip_column_types; - +----------------------------------+ - | @@tidb_analyze_skip_column_types | - +----------------------------------+ - | json,blob,mediumblob,longblob,mediumtext,longtext | - +----------------------------------+ - 1 row in set (0.00 sec) - - mysql> ANALYZE TABLE t; - Query OK, 0 rows affected, 1 warning (0.05 sec) - - mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; - +---------------------------------------------------------------------+ - | job_info | - +---------------------------------------------------------------------+ - | analyze table columns a, b with 256 buckets, 500 topn, 1 samplerate | - +---------------------------------------------------------------------+ - 1 row in set (0.00 sec) - - mysql> ANALYZE TABLE t COLUMNS a, c; - Query OK, 0 rows affected, 1 warning (0.04 sec) - - mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; - +------------------------------------------------------------------+ - | job_info | - +------------------------------------------------------------------+ - | analyze table columns a with 256 buckets, 500 topn, 1 samplerate | - +------------------------------------------------------------------+ - 1 row in set (0.00 sec) +``` +mysql> SHOW CREATE TABLE t; ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Table | Create Table | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| t | CREATE TABLE `t` ( + `a` int DEFAULT NULL, + `b` varchar(10) DEFAULT NULL, + `c` json DEFAULT NULL, + `d` blob DEFAULT NULL, + `e` longblob DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin | ++-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +1 row in set (0.00 sec) + +mysql> SELECT @@tidb_analyze_skip_column_types; ++----------------------------------+ +| @@tidb_analyze_skip_column_types | ++----------------------------------+ +| json,blob,mediumblob,longblob,mediumtext,longtext | ++----------------------------------+ +1 row in set (0.00 sec) + +mysql> ANALYZE TABLE t; +Query OK, 0 rows affected, 1 warning (0.05 sec) + +mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; ++---------------------------------------------------------------------+ +| job_info | ++---------------------------------------------------------------------+ +| analyze table columns a, b with 256 buckets, 500 topn, 1 samplerate | ++---------------------------------------------------------------------+ +1 row in set (0.00 sec) + +mysql> ANALYZE TABLE t COLUMNS a, c; +Query OK, 0 rows affected, 1 warning (0.04 sec) + +mysql> SELECT job_info FROM mysql.analyze_jobs ORDER BY end_time DESC LIMIT 1; ++------------------------------------------------------------------+ +| job_info | ++------------------------------------------------------------------+ +| analyze table columns a with 256 buckets, 500 topn, 1 samplerate | ++------------------------------------------------------------------+ +1 row in set (0.00 sec) +``` ### tidb_auto_analyze_concurrency New in v8.4.0 @@ -1594,13 +1594,17 @@ MPP は、 TiFlashエンジンによって提供される分散コンピュー insert into t values (1); ``` - Query OK, 1 row affected + ``` + Query OK, 1 row affected + ``` ```sql tidb> commit; -- Check only when a transaction is committed. ``` - ERROR 1062 : Duplicate entry '1' for key 't.PRIMARY' + ``` + ERROR 1062 : Duplicate entry '1' for key 't.PRIMARY' + ``` - `tidb_constraint_check_in_place_pessimistic`を`ON`に設定し、悲観的トランザクションを使用する場合: @@ -1610,7 +1614,9 @@ MPP は、 TiFlashエンジンによって提供される分散コンピュー insert into t values (1); ``` - ERROR 1062 : Duplicate entry '1' for key 't.PRIMARY' + ``` + ERROR 1062 : Duplicate entry '1' for key 't.PRIMARY' + ``` ### tidb_cost_model_version New in v6.2.0 diff --git a/ticdc/ticdc-bidirectional-replication.md b/ticdc/ticdc-bidirectional-replication.md index 85bd93afe5c13..2df52393ef412 100644 --- a/ticdc/ticdc-bidirectional-replication.md +++ b/ticdc/ticdc-bidirectional-replication.md @@ -108,15 +108,17 @@ BDRロールが設定されていない場合、任意のDDLを実行できま ADMIN SET BDR ROLE PRIMARY; ``` - Query OK, 0 rows affected - Time: 0.003s - - ADMIN SHOW BDR ROLE; - +----------+ - | BDR_ROLE | - +----------+ - | primary | - +----------+ + ``` + Query OK, 0 rows affected + Time: 0.003s + + ADMIN SHOW BDR ROLE; + +----------+ + | BDR_ROLE | + +----------+ + | primary | + +----------+ + ``` 2. 他の TiDB クラスターで`ADMIN SET BDR ROLE SECONDARY`を実行して、それらをセカンダリ クラスターとして設定します。 diff --git a/ticdc/ticdc-canal-json.md b/ticdc/ticdc-canal-json.md index c60273344f201..398ccf5e1e292 100644 --- a/ticdc/ticdc-canal-json.md +++ b/ticdc/ticdc-canal-json.md @@ -503,38 +503,40 @@ v5.4.0 から、 `Delete`イベントのうち`old`フィールドが変更さ 以下はイベントメッセージ`Delete`です。v5.4.0より前のバージョンでは、フィールド`old`は「data」フィールドと同じ内容です。v5.4.0以降のバージョンでは、フィールド`old` nullに設定されます。「data」フィールドを使用することで、削除されたデータを取得できます。 - { - "id": 0, - "database": "test", +``` +{ + "id": 0, + "database": "test", + ... + "type": "DELETE", + ... + "sqlType": { ... - "type": "DELETE", + }, + "mysqlType": { ... - "sqlType": { - ... - }, - "mysqlType": { - ... - }, - "data": [ - { - "c_bigint": "9223372036854775807", - "c_int": "0", - "c_mediumint": "8388607", - "c_smallint": "32767", - "c_tinyint": "0", - "id": "2" - } - ], - "old": null, - // The following is an example before v5.4.0. The `old` field contains the same content as the "data" field. - "old": [ - { - "c_bigint": "9223372036854775807", - "c_int": "0", - "c_mediumint": "8388607", - "c_smallint": "32767", - "c_tinyint": "0", - "id": "2" - } - ] - } + }, + "data": [ + { + "c_bigint": "9223372036854775807", + "c_int": "0", + "c_mediumint": "8388607", + "c_smallint": "32767", + "c_tinyint": "0", + "id": "2" + } + ], + "old": null, + // The following is an example before v5.4.0. The `old` field contains the same content as the "data" field. + "old": [ + { + "c_bigint": "9223372036854775807", + "c_int": "0", + "c_mediumint": "8388607", + "c_smallint": "32767", + "c_tinyint": "0", + "id": "2" + } + ] +} +``` diff --git a/ticdc/ticdc-changefeed-config.md b/ticdc/ticdc-changefeed-config.md index 6f04f7950a5df..872235882320d 100644 --- a/ticdc/ticdc-changefeed-config.md +++ b/ticdc/ticdc-changefeed-config.md @@ -23,7 +23,9 @@ Info: {"upstream_id":7178706266519722477,"namespace":"default","id":"simple-repl - `--sink-uri` : レプリケーション タスクのダウンストリーム アドレス。 `--sink-uri`は、次の形式に従って設定します。現在、このスキームは`mysql` 、 `tidb` 、および`kafka`をサポートしています。 - [scheme]://[userinfo@][host]:[port][/path]?[query_parameters] + ``` + [scheme]://[userinfo@][host]:[port][/path]?[query_parameters] + ``` シンク URI パラメータに`! * ' ( ) ; : @ & = + $ , / ? % # [ ]`などの特殊文字が含まれている場合は、 [URIエンコーダー](https://www.urlencoder.org/)のように特殊文字をエスケープする必要があります。 diff --git a/ticdc/ticdc-classic-architecture.md b/ticdc/ticdc-classic-architecture.md index 3e4a671a875bd..9ac8bfa2b569b 100644 --- a/ticdc/ticdc-classic-architecture.md +++ b/ticdc/ticdc-classic-architecture.md @@ -48,14 +48,16 @@ TiCDCにおけるChangefeedとTaskは、2つの論理的な概念です。具体 例えば: - cdc cli changefeed create --server="http://127.0.0.1:8300" --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" - cat changefeed.toml - ...... - [sink] - dispatchers = [ - {matcher = ['test1.tab1', 'test2.tab2'], topic = "{schema}_{table}"}, - {matcher = ['test3.tab3', 'test4.tab4'], topic = "{schema}_{table}"}, - ] +``` +cdc cli changefeed create --server="http://127.0.0.1:8300" --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" +cat changefeed.toml +...... +[sink] +dispatchers = [ + {matcher = ['test1.tab1', 'test2.tab2'], topic = "{schema}_{table}"}, + {matcher = ['test3.tab3', 'test4.tab4'], topic = "{schema}_{table}"}, +] +``` 前述の`cdc cli changefeed create`コマンドのパラメータの詳細については、 [TiCDC Changefeedコンフィグレーションパラメータ](/ticdc/ticdc-changefeed-config.md)を参照してください。 @@ -112,7 +114,9 @@ TiCDCは、データ複製の状態を示すために、一連のタイムスタ TiCDCの場合、TiKVから送信されるResolvedTSは``形式の特別なイベントです。一般に、ResolvedTSは以下の制約を満たします。 - table ResolvedTS >= global ResolvedTS + ``` + table ResolvedTS >= global ResolvedTS + ``` #### チェックポイントTS {#checkpointts} @@ -124,11 +128,15 @@ TiCDCは、データ複製の状態を示すために、一連のタイムスタ 一般に、チェックポイントTS は次の制約を満たします。 - table CheckpointTS >= global CheckpointTS +``` +table CheckpointTS >= global CheckpointTS +``` TiCDC はグローバル ResolvedTS よりも小さいデータのみをダウンストリームに複製するため、完全な制約は次のようになります。 - table ResolvedTS >= global ResolvedTS >= table CheckpointTS >= global CheckpointTS +``` +table ResolvedTS >= global ResolvedTS >= table CheckpointTS >= global CheckpointTS +``` データの変更とトランザクションがコミットされた後、TiKVノードのResolvedTSは引き続き進み、TiCDCノードのPullerモジュールはTiKVからプッシュされたデータを受信し続けます。Pullerモジュールは受信したデータの変更に基づいて増分データをスキャンするかどうかも決定し、すべてのデータ変更がTiCDCノードに送信されるようにします。 diff --git a/ticdc/ticdc-csv.md b/ticdc/ticdc-csv.md index 65a01a1258ed5..db3a4d315b3f0 100644 --- a/ticdc/ticdc-csv.md +++ b/ticdc/ticdc-csv.md @@ -82,13 +82,15 @@ CREATE TABLE `employee` ( `include-commit-ts = true`と`output-old-value = true`の場合、このテーブルの DML イベントは、次のように CSV 形式で保存されます。 - "I","employee","hr",433305438660591626,false,101,"Smith","Bob","2014-06-04","New York" - "D","employee","hr",433305438660591627,true,101,"Smith","Bob","2015-10-08","Shanghai" - "I","employee","hr",433305438660591627,true,101,"Smith","Bob","2015-10-08","Los Angeles" - "D","employee","hr",433305438660591629,false,101,"Smith","Bob","2017-03-13","Dallas" - "I","employee","hr",433305438660591630,false,102,"Alex","Alice","2017-03-14","Shanghai" - "D","employee","hr",433305438660591630,true,102,"Alex","Alice","2017-03-14","Beijing" - "I","employee","hr",433305438660591630,true,102,"Alex","Alice","2018-06-15","Beijing" +``` +"I","employee","hr",433305438660591626,false,101,"Smith","Bob","2014-06-04","New York" +"D","employee","hr",433305438660591627,true,101,"Smith","Bob","2015-10-08","Shanghai" +"I","employee","hr",433305438660591627,true,101,"Smith","Bob","2015-10-08","Los Angeles" +"D","employee","hr",433305438660591629,false,101,"Smith","Bob","2017-03-13","Dallas" +"I","employee","hr",433305438660591630,false,102,"Alex","Alice","2017-03-14","Shanghai" +"D","employee","hr",433305438660591630,true,102,"Alex","Alice","2017-03-14","Beijing" +"I","employee","hr",433305438660591630,true,102,"Alex","Alice","2018-06-15","Beijing" +``` `include-commit-ts = true` 、 `output-old-value = true` 、および`output-field-header = true`の場合、このテーブルのDMLイベントは、次のようにCSV形式で保存されます。 diff --git a/ticdc/ticdc-faq.md b/ticdc/ticdc-faq.md index ff0e6dc863d7e..17804df15a947 100644 --- a/ticdc/ticdc-faq.md +++ b/ticdc/ticdc-faq.md @@ -508,7 +508,9 @@ UPDATE data_table SET value = 'v1' WHERE id = 2; `CDC:ErrMySQLDuplicateEntryCDC`エラーが頻繁に発生する場合は、 [`sink-uri`](/ticdc/ticdc-sink-to-mysql.md#configure-sink-uri-for-mysql-or-tidb)構成で`safe-mode=true`パラメータを設定することで TiCDC セーフ モードを有効にすることができます。 - mysql://user:password@host:port/?safe-mode=true +``` +mysql://user:password@host:port/?safe-mode=true +``` セーフ モードでは、TiCDC は`UPDATE`操作を`DELETE + REPLACE INTO`に分割して実行し、一意のキーの競合エラーを回避します。 diff --git a/ticdc/ticdc-integrity-check.md b/ticdc/ticdc-integrity-check.md index 0694c2c571c1a..1ba13e9226c87 100644 --- a/ticdc/ticdc-integrity-check.md +++ b/ticdc/ticdc-integrity-check.md @@ -79,13 +79,15 @@ For clusters created in v8.4.0 or later, or clusters upgraded to v8.4.0 or later チェックサム計算アルゴリズムの疑似コードは次のとおりです。 - fn checksum(columns) { - let result = 0 - for column in sort_by_schema_order(columns) { - result = crc32.update(result, encode(column)) - } - return result +``` +fn checksum(columns) { + let result = 0 + for column in sort_by_schema_order(columns) { + result = crc32.update(result, encode(column)) } + return result +} +``` - `columns`列IDでソートする必要があります。Avroスキーマでは、フィールドは既に列IDでソートされているため、 `columns`の順序をそのまま使用できます。 diff --git a/ticdc/ticdc-sink-to-cloud-storage.md b/ticdc/ticdc-sink-to-cloud-storage.md index 47c8a3ac670ff..2221d5b984ca8 100644 --- a/ticdc/ticdc-sink-to-cloud-storage.md +++ b/ticdc/ticdc-sink-to-cloud-storage.md @@ -193,7 +193,9 @@ GCSへのアクセスに使用するアカウントは、アクセスキーを インデックスファイルには、現在のディレクトリで使用されている最大のファイル名が記録されます。例: - CDC000005.csv +``` +CDC000005.csv +``` この例では、このディレクトリ内のファイル`CDC000001.csv`から`CDC000004.csv`使用中です。TiCDC クラスターでテーブルスケジューリングまたはノードの再起動が発生すると、新しいノードはインデックスファイルを読み取り、 `CDC000005.csv`使用中かどうかを判断します。使用中でない場合、新しいノードは`CDC000005.csv`からファイルに書き込みます。使用中の場合は`CDC000006.csv`から書き込みを開始し、他のノードによって書き込まれたデータの上書きを防ぎます。 diff --git a/ticdc/ticdc-sink-to-kafka.md b/ticdc/ticdc-sink-to-kafka.md index d95a7d08a6a1b..9cc661fba8739 100644 --- a/ticdc/ticdc-sink-to-kafka.md +++ b/ticdc/ticdc-sink-to-kafka.md @@ -124,7 +124,7 @@ Info: {"sink-uri":"kafka://127.0.0.1:9092,127.0.0.1:9093,127.0.0.1:9094/topic-na - SASL/プレーン ```shell - --sink-uri="kafka://127.0.0.1:9092/topic-name?kafka-version=2.4.0&sasl-user=alice-user&sasl-password=alice-secret&sasl-mechanism=plain" + --sink-uri="kafka://127.0.0.1:9092/topic-name?kafka-version=2.4.0&sasl-user=alice-user&sasl-password=alice-secret&sasl-mechanism=plain" ``` - SASL/スクラム @@ -136,7 +136,7 @@ Info: {"sink-uri":"kafka://127.0.0.1:9092,127.0.0.1:9093,127.0.0.1:9094/topic-na SASL/GSSAPI `user`認証: ```shell - --sink-uri="kafka://127.0.0.1:9092/topic-name?kafka-version=2.4.0&sasl-mechanism=gssapi&sasl-gssapi-auth-type=user&sasl-gssapi-kerberos-config-path=/etc/krb5.conf&sasl-gssapi-service-name=kafka&sasl-gssapi-user=alice/for-kafka&sasl-gssapi-password=alice-secret&sasl-gssapi-realm=example.com" + --sink-uri="kafka://127.0.0.1:9092/topic-name?kafka-version=2.4.0&sasl-mechanism=gssapi&sasl-gssapi-auth-type=user&sasl-gssapi-kerberos-config-path=/etc/krb5.conf&sasl-gssapi-service-name=kafka&sasl-gssapi-user=alice/for-kafka&sasl-gssapi-password=alice-secret&sasl-gssapi-realm=example.com" ``` `sasl-gssapi-user`と`sasl-gssapi-realm`の値は、Kerberos で指定されている[原理](https://web.mit.edu/kerberos/krb5-1.5/krb5-1.5.4/doc/krb5-user/What-is-a-Kerberos-Principal_003f.html)と関連しています。例えば、プリンシパルが`alice/for-kafka@example.com`に設定されている場合、 `sasl-gssapi-user`と`sasl-gssapi-realm`はそれぞれ`alice/for-kafka`と`example.com`として指定されます。 @@ -144,7 +144,7 @@ Info: {"sink-uri":"kafka://127.0.0.1:9092,127.0.0.1:9093,127.0.0.1:9094/topic-na SASL/GSSAPI `keytab`認証: ```shell - --sink-uri="kafka://127.0.0.1:9092/topic-name?kafka-version=2.4.0&sasl-mechanism=gssapi&sasl-gssapi-auth-type=keytab&sasl-gssapi-kerberos-config-path=/etc/krb5.conf&sasl-gssapi-service-name=kafka&sasl-gssapi-user=alice/for-kafka&sasl-gssapi-keytab-path=/var/lib/secret/alice.key&sasl-gssapi-realm=example.com" + --sink-uri="kafka://127.0.0.1:9092/topic-name?kafka-version=2.4.0&sasl-mechanism=gssapi&sasl-gssapi-auth-type=keytab&sasl-gssapi-kerberos-config-path=/etc/krb5.conf&sasl-gssapi-service-name=kafka&sasl-gssapi-user=alice/for-kafka&sasl-gssapi-keytab-path=/var/lib/secret/alice.key&sasl-gssapi-realm=example.com" ``` SASL/GSSAPI 認証方式の詳細については、 [GSSAPIの設定](https://docs.confluent.io/platform/current/kafka/authentication_sasl/authentication_sasl_gssapi.html)を参照してください。 @@ -309,15 +309,19 @@ dispatchers = [ > > バージョン6.1.0以降、設定の意味を明確にするため、パーティションディスパッチャを指定するための設定が`dispatcher`から`partition`に変更されました。`partition`は`dispatcher`の別名です。例えば、次の2つのルールは全く同じ意味です。 > -> [sink] -> dispatchers = [ -> {matcher = ['*.*'], dispatcher = "index-value"}, -> {matcher = ['*.*'], partition = "index-value"}, -> ] +> ``` +> [sink] +> dispatchers = [ +> {matcher = ['*.*'], dispatcher = "index-value"}, +> {matcher = ['*.*'], partition = "index-value"}, +> ] +> ``` > > ただし、 `dispatcher`と`partition`同じルール内に出現させることはできません。例えば、次のルールは無効です。 > -> {matcher = ['*.*'], dispatcher = "index-value", partition = "table"}, +> ``` +> {matcher = ['*.*'], dispatcher = "index-value", partition = "table"}, +> ``` ## カラムセレクター {#column-selectors} diff --git a/ticdc/ticdc-sink-to-mysql.md b/ticdc/ticdc-sink-to-mysql.md index 6f891e0102adf..dce47fbfe61e6 100644 --- a/ticdc/ticdc-sink-to-mysql.md +++ b/ticdc/ticdc-sink-to-mysql.md @@ -40,7 +40,9 @@ Info: {"sink-uri":"mysql://root:123456@127.0.0.1:3306/","opts":{},"create-time": シンクURIは、TiCDCターゲットシステムの接続情報を指定するために使用されます。フォーマットは以下のとおりです。 - [scheme]://[userinfo@][host]:[port][/path]?[query_parameters] +``` +[scheme]://[userinfo@][host]:[port][/path]?[query_parameters] +``` > **Note:** > diff --git a/ticdc/ticdc-storage-consumer-dev-guide.md b/ticdc/ticdc-storage-consumer-dev-guide.md index 785e1a1b1f57f..f8c3eab191631 100644 --- a/ticdc/ticdc-storage-consumer-dev-guide.md +++ b/ticdc/ticdc-storage-consumer-dev-guide.md @@ -99,12 +99,14 @@ func (tc *TableVersionConsumer) ExecuteDML() {} コンシューマーが初めてディレクトリをトラバースします。以下は例です。 - ├── metadata - └── test - ├── tbl_1 - │ └── 437752935075545091 - │ ├── CDC000001.json - │ └── schema.json +``` +├── metadata +└── test + ├── tbl_1 + │ └── 437752935075545091 + │ ├── CDC000001.json + │ └── schema.json +``` コンシューマーは`schema.json`ファイルのテーブル スキーマを解析し、DDL クエリ ステートメントを取得します。 @@ -155,15 +157,17 @@ func (tc *TableVersionConsumer) ExecuteDML() {} コンシューマーがディレクトリを再度走査すると、テーブルの新しいバージョンディレクトリが見つかります。コンシューマーが新しいディレクトリのデータを使用できるのは、 `test/tbl_1/437752935075545091`のディレクトリ内のすべてのファイルが消費された後のみであることに注意してください。 - ├── metadata - └── test - ├── tbl_1 - │ ├── 437752935075545091 - │ │ ├── CDC000001.json - │ │ └── schema.json - │ └── 437752935075546092 - │ │ └── CDC000001.json - │ │ └── schema.json +``` +├── metadata +└── test + ├── tbl_1 + │ ├── 437752935075545091 + │ │ ├── CDC000001.json + │ │ └── schema.json + │ └── 437752935075546092 + │ │ └── CDC000001.json + │ │ └── schema.json +``` 消費ロジックは一貫しています。具体的には、コンシューマーは`schema.json`ファイルのテーブルスキーマを解析し、それに応じたDDLクエリステートメントを取得して処理します。その後、コンシューマーは`CDC000001.json`ファイルのレプリケーションを開始します。 diff --git a/ticdc/troubleshoot-ticdc.md b/ticdc/troubleshoot-ticdc.md index c4efdd2ffeb84..9f1bf88b81adc 100644 --- a/ticdc/troubleshoot-ticdc.md +++ b/ticdc/troubleshoot-ticdc.md @@ -64,11 +64,13 @@ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p 上記のコマンドの出力が次のようなものであれば、インポートは成功しています。 - Enter password: - Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it. - Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it. - Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it. - Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it. +``` +Enter password: +Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it. +Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it. +Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it. +Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it. +``` ダウンストリームが特殊なMySQL環境(パブリッククラウドRDSまたは一部のMySQL派生バージョン)であり、前述の方法によるタイムゾーンのインポートに失敗した場合は、シンクURIの`time-zone`を空の値(例: `time-zone=""` )に設定することで、ダウンストリームのデフォルトのタイムゾーンを使用できます。`time-zone` `mysql`と`tidb`シンクにのみ有効であることに注意してください。 @@ -103,12 +105,14 @@ v4.0.9 以降では、レプリケーション タスクで統合ソーター機 TiCDC が Kafka に送信するメッセージのサイズを制御するには、Sink URI で`max-message-bytes`パラメータを設定します。ただし、Kafkaサーバーがそのサイズのメッセージを受け入れるように設定されていることも確認する必要があります。TiCDC からのメッセージが Kafka サーバーの制限を超えた場合、Kafka は`Message was too large`エラーを返します。Kafkaサーバーの設定ファイルに追加してください。 - # The maximum byte number of a message that the broker receives - message.max.bytes=2147483648 - # The maximum byte number of a message that the broker copies - replica.fetch.max.bytes=2147483648 - # The maximum message byte number that the consumer side reads - fetch.message.max.bytes=2147483648 +``` +# The maximum byte number of a message that the broker receives +message.max.bytes=2147483648 +# The maximum byte number of a message that the broker copies +replica.fetch.max.bytes=2147483648 +# The maximum message byte number that the consumer side reads +fetch.message.max.bytes=2147483648 +``` ## TiCDC レプリケーション中に、ダウンストリームで DDL ステートメントの実行が失敗したかどうかを確認するにはどうすればよいでしょうか? レプリケーションを再開するにはどうすればよいでしょうか? {#how-can-i-find-out-whether-a-ddl-statement-fails-to-execute-in-downstream-during-ticdc-replication-how-to-resume-the-replication}