From a53756f1b8f082b500bb6ee221b86200dec098e8 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 2 Nov 2022 15:16:01 +0800 Subject: [PATCH] update information-schema/information-schema-tiflash-replica.md (#10458) --- .../information-schema-tiflash-replica.md | 10 ++++++++++ quick-start-with-htap.md | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/information-schema/information-schema-tiflash-replica.md b/information-schema/information-schema-tiflash-replica.md index 38da3a3607da0..93c71f2bdbfa7 100644 --- a/information-schema/information-schema-tiflash-replica.md +++ b/information-schema/information-schema-tiflash-replica.md @@ -28,3 +28,13 @@ DESC tiflash_replica; +-----------------+-------------+------+------+---------+-------+ 7 rows in set (0.01 sec) ``` + +Fields in the `TIFLASH_REPLICA` table are described as follows: + +- `TABLE_SCHEMA`: the name of the database to which the table belongs. +- `TABLE_NAME`: the name of the table. +- `TABLE_ID`: the internal ID of the table, which is unique within a TiDB cluster. +- `REPLICA_COUNT`: the number of TiFlash replicas. +- `LOCATION_LABELS`: the LocationLabelList that is set when a TiFlash replica is created. +- `AVAILABLE`: indicates whether the TiFlash replica of the table is available. When the value is `1` (available), the TiDB optimizer can intelligently choose to push down queries to TiKV or TiFlash based on query cost. When the value is `0` (unavailable), TiDB will not push down queries to TiFlash. Once the value of this field becomes `1` (available), it will not change anymore. +- `PROGRESS`: the replication progress of TiFlash replicas, with the accuracy to two decimal places and at the minute level. The scope of this field is `[0, 1]`. When the `AVAILABLE` field is `1` and `PROGRESS` is less than 1, the TiFlash replica is far behind TiKV, and the queries pushed down to TiFlash will probably fail due to timeout of waiting for data replication. \ No newline at end of file diff --git a/quick-start-with-htap.md b/quick-start-with-htap.md index 8c8f2f414b61d..6c5b0e6c16f92 100644 --- a/quick-start-with-htap.md +++ b/quick-start-with-htap.md @@ -161,8 +161,8 @@ SELECT * FROM information_schema.tiflash_replica WHERE TABLE_SCHEMA = 'test' and In the result of the above statements: -- `AVAILABLE` indicates whether the TiFlash replica of a specific table is available or not. `1` means available and `0` means unavailable. Once a replica becomes available, this status does not change any more. If you use DDL statements to modify the number of replicas, the replication status will be recalculated. -- `PROGRESS` means the progress of the replication. The value is between 0.0 and 1.0. 1 means at least one replica is replicated. +- `AVAILABLE` indicates whether the TiFlash replica of a specific table is available or not. `1` means available and `0` means unavailable. Once the `AVAILABLE` field becomes `1`, this status does not change anymore. +- `PROGRESS` means the progress of the replication. The value is between 0.0 and 1.0. 1 means that the replication progress of the TiFlash replica is complete. ### Step 5. Analyze data faster using HTAP