Skip to content

Commit

Permalink
remove links to tidb-ansible (#10075) (#10095)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jun 24, 2022
1 parent 46f288f commit 98a459c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
28 changes: 17 additions & 11 deletions best-practices/high-concurrency-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,24 @@ SPLIT TABLE TEST_HOTSPOT BETWEEN (0) AND (9223372036854775807) REGIONS 128;

切分完成以后,可以通过 `SHOW TABLE test_hotspot REGIONS;` 语句查看打散的情况。如果 `SCATTERING` 列值全部为 `0`,代表调度成功。

也可以通过 [table-regions.py](https://github.com/pingcap/tidb-ansible/blob/dabf60baba5e740a4bee9faf95e77563d8084be1/scripts/table-regions.py) 脚本,查看 Region 的分布。目前分布已经比较均匀了:
也可以通过以下 SQL 语句查看 Region 的分布。你需要将 `table_name` 替换为实际的表名。

```
[root@172.16.4.4 scripts]# python table-regions.py --host 172.16.4.3 --port 31453 test test_hotspot
[RECORD - test.test_hotspot] - Leaders Distribution:
total leader count: 127
store: 1, num_leaders: 21, percentage: 16.54%
store: 4, num_leaders: 20, percentage: 15.75%
store: 6, num_leaders: 21, percentage: 16.54%
store: 46, num_leaders: 21, percentage: 16.54%
store: 82, num_leaders: 23, percentage: 18.11%
store: 62, num_leaders: 21, percentage: 16.54%
{{< copyable "sql" >}}

```sql
SELECT
p.STORE_ID,
COUNT(s.REGION_ID) PEER_COUNT
FROM
INFORMATION_SCHEMA.TIKV_REGION_STATUS s
JOIN INFORMATION_SCHEMA.TIKV_REGION_PEERS p ON s.REGION_ID = p.REGION_ID
WHERE
TABLE_NAME = 'table_name'
AND p.is_leader = 1
GROUP BY
p.STORE_ID
ORDER BY
PEER_COUNT DESC;
```

再重新运行写入负载:
Expand Down
2 changes: 1 addition & 1 deletion deploy-monitoring-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ url = https://grafana.net

2. 在侧边栏菜单中,依次点击 **Dashboards** > **Import** 打开 **Import Dashboard** 窗口。

3. 点击 **Upload .json File** 上传对应的 JSON 文件(下载 [TiDB Grafana 配置文件](https://github.com/pingcap/tidb-ansible/tree/master/scripts)
3. 点击 **Upload .json File** 上传对应的 JSON 文件([pingcap/tidb](https://github.com/pingcap/tidb/tree/master/metrics/grafana)[tikv/tikv](https://github.com/tikv/tikv/tree/master/metrics/grafana)[tikv/pd](https://github.com/tikv/pd/tree/master/metrics/grafana) 下载 TiDB Grafana 配置文件)

> **注意:**
>
Expand Down
2 changes: 1 addition & 1 deletion tidb-troubleshooting-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ summary: 了解如何处理 TiDB 集群常见问题。

### 5.4 Grafana 显示问题

- 5.4.1 监控 **Grafana** -> **PD** -> **cluster** -> **role** 显示 follower,Grafana 表达式问题,在 v3.0.8 版本修复,见 [#1065](https://github.com/pingcap/tidb-ansible/pull/1065)。详情请参考案例 [case-1022](https://github.com/pingcap/tidb-map/blob/master/maps/diagnose-case-study/case1022.md)
- 5.4.1 监控 **Grafana** -> **PD** -> **cluster** -> **role** 显示 follower,Grafana 表达式问题,在 v3.0.8 版本修复。

## 6. 生态 Tools 问题

Expand Down

0 comments on commit 98a459c

Please sign in to comment.