Skip to content

Commit

Permalink
update information-schema/information-schema-tiflash-replica.md (ping…
Browse files Browse the repository at this point in the history
  • Loading branch information
qiancai authored Nov 2, 2022
1 parent 06c548d commit a53756f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions information-schema/information-schema-tiflash-replica.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions quick-start-with-htap.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a53756f

Please sign in to comment.