Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into ttl_update
Browse files Browse the repository at this point in the history
  • Loading branch information
hfxsd committed Jan 6, 2025
2 parents c9e1634 + 6822b22 commit ad56c44
Show file tree
Hide file tree
Showing 127 changed files with 2,648 additions and 1,088 deletions.
3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ By default, **CHOOSE MASTER ONLY** so your changes will be applied to the next T
For details, see [tips for choosing the affected versions (in Chinese)](https://github.com/pingcap/docs-cn/blob/master/CONTRIBUTING.md#版本选择指南).

- [ ] master (the latest development version)
- [ ] v9.0 (TiDB 9.0 versions)
- [ ] v8.5 (TiDB 8.5 versions)
- [ ] v8.4 (TiDB 8.4 versions)
- [ ] v8.3 (TiDB 8.3 versions)
- [ ] v8.2 (TiDB 8.2 versions)
- [ ] v8.1 (TiDB 8.1 versions)
- [ ] v7.5 (TiDB 7.5 versions)
- [ ] v7.1 (TiDB 7.1 versions)
- [ ] v6.5 (TiDB 6.5 versions)
- [ ] v6.1 (TiDB 6.1 versions)
- [ ] v5.4 (TiDB 5.4 versions)
- [ ] v5.3 (TiDB 5.3 versions)

### What is the related PR or file link(s)?

Expand Down
19 changes: 0 additions & 19 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
- breezewish
- CaitinChen
- CharLotteiu
- cofyc
- csuzhangxc
- DanielZhangQD
- dcalvin
- dragonly
- en-jin19
- hfxsd
- Icemap
- jackysp
- kissmydb
- lance6716
- lichunzhu
- lilin90
- Liuxiaozhen12
- morgo
- Oreoxmt
- overvenus
- qiancai
- queenypingcap
- ran-huang
- shichun-0415
- SunRunAway
- tangenta
- TomShawn
- toutdesuite
- WangXiangUSTC
- yikeke
- YiniXu9506
reviewers:
- 3pointer
- amyangfei
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
| 文档仓库 branch | 对应 TiDB 文档版本 |
|:---------|:----------|
| [`master`](https://github.com/pingcap/docs-cn/tree/master) | dev 最新开发版 |
| [`release-8.5`](https://github.com/pingcap/docs-cn/tree/release-8.5) | 8.5 长期支持版 (LTS) |
| [`release-8.4`](https://github.com/pingcap/docs-cn/tree/release-8.4) | 8.4 开发里程碑版 (DMR) |
| [`release-8.3`](https://github.com/pingcap/docs-cn/tree/release-8.3) | 8.3 开发里程碑版 (DMR) |
| [`release-8.2`](https://github.com/pingcap/docs-cn/tree/release-8.2) | 8.2 开发里程碑版 (DMR) |
| [`release-8.2`](https://github.com/pingcap/docs-cn/tree/release-8.2) | 8.2 开发里程碑版 (DMR) (该版本文档已归档,不再提供任何更新) |
| [`release-8.1`](https://github.com/pingcap/docs-cn/tree/release-8.1) | 8.1 长期支持版 (LTS) |
| [`release-8.0`](https://github.com/pingcap/docs-cn/tree/release-8.0) | 8.0 开发里程碑版 (DMR) (该版本文档已归档,不再提供任何更新)|
| [`release-7.6`](https://github.com/pingcap/docs-cn/tree/release-7.6) | 7.6 开发里程碑版 (DMR) (该版本文档已归档,不再提供任何更新)|
Expand All @@ -35,7 +36,7 @@
| [`release-6.1`](https://github.com/pingcap/docs-cn/tree/release-6.1) | 6.1 长期支持版 (LTS) |
| [`release-6.0`](https://github.com/pingcap/docs-cn/tree/release-6.0) | 6.0 开发里程碑版 (DMR)(该版本文档已归档,不再提供任何更新) |
| [`release-5.4`](https://github.com/pingcap/docs-cn/tree/release-5.4) | 5.4 稳定版 |
| [`release-5.3`](https://github.com/pingcap/docs-cn/tree/release-5.3) | 5.3 稳定版 |
| [`release-5.3`](https://github.com/pingcap/docs-cn/tree/release-5.3) | 5.3 稳定版 (该版本文档已归档,不再提供任何更新) |
| [`release-5.2`](https://github.com/pingcap/docs-cn/tree/release-5.2) | 5.2 稳定版 (该版本文档已归档,不再提供任何更新)|
| [`release-5.1`](https://github.com/pingcap/docs-cn/tree/release-5.1) | 5.1 稳定版 (该版本文档已归档,不再提供任何更新)|
| [`release-5.0`](https://github.com/pingcap/docs-cn/tree/release-5.0) | 5.0 稳定版(该版本文档已归档,不再提供任何更新) |
Expand Down
37 changes: 21 additions & 16 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- [文档中心](https://docs.pingcap.com/zh)
- 关于 TiDB
- [TiDB 简介](/overview.md)
- [TiDB 8.4 Release Notes](/releases/release-8.4.0.md)
- [TiDB 8.5 Release Notes](/releases/release-8.5.0.md)
- [功能概览](/basic-features.md)
- [与 MySQL 的兼容性](/mysql-compatibility.md)
- [使用限制](/tidb-limitations.md)
Expand Down Expand Up @@ -78,23 +78,23 @@
- [Stale Read](/develop/dev-guide-use-stale-read.md)
- [HTAP 查询](/develop/dev-guide-hybrid-oltp-and-olap-queries.md)
- 向量搜索
- [概述](/vector-search-overview.md)
- [概述](/vector-search/vector-search-overview.md)
- 快速入门
- [使用 SQL 开始向量搜索](/vector-search-get-started-using-sql.md)
- [使用 Python 开始向量搜索](/vector-search-get-started-using-python.md)
- [使用 SQL 开始向量搜索](/vector-search/vector-search-get-started-using-sql.md)
- [使用 Python 开始向量搜索](/vector-search/vector-search-get-started-using-python.md)
- 集成
- [集成概览](/vector-search-integration-overview.md)
- [集成概览](/vector-search/vector-search-integration-overview.md)
- AI 框架
- [LlamaIndex](/vector-search-integrate-with-llamaindex.md)
- [Langchain](/vector-search-integrate-with-langchain.md)
- [LlamaIndex](/vector-search/vector-search-integrate-with-llamaindex.md)
- [Langchain](/vector-search/vector-search-integrate-with-langchain.md)
- 嵌入模型/服务
- [Jina AI](/vector-search-integrate-with-jinaai-embedding.md)
- [Jina AI](/vector-search/vector-search-integrate-with-jinaai-embedding.md)
- ORM 库
- [SQLAlchemy](/vector-search-integrate-with-sqlalchemy.md)
- [peewee](/vector-search-integrate-with-peewee.md)
- [Django](/vector-search-integrate-with-django-orm.md)
- [优化搜索性能](/vector-search-improve-performance.md)
- [使用限制](/vector-search-limitations.md)
- [SQLAlchemy](/vector-search/vector-search-integrate-with-sqlalchemy.md)
- [peewee](/vector-search/vector-search-integrate-with-peewee.md)
- [Django](/vector-search/vector-search-integrate-with-django-orm.md)
- [优化搜索性能](/vector-search/vector-search-improve-performance.md)
- [使用限制](/vector-search/vector-search-limitations.md)
- 事务
- [概览](/develop/dev-guide-transaction-overview.md)
- [乐观事务和悲观事务](/develop/dev-guide-optimistic-and-pessimistic-transaction.md)
Expand Down Expand Up @@ -314,6 +314,7 @@
- [TiKV 线程调优](/tune-tikv-thread-performance.md)
- [TiKV 内存调优](/tune-tikv-memory-performance.md)
- [TiKV Follower Read](/follower-read.md)
- [TiKV MVCC 内存引擎](/tikv-in-memory-engine.md)
- [Region 性能调优](/tune-region-performance.md)
- [TiFlash 调优](/tiflash/tune-tiflash-performance.md)
- [下推计算结果缓存](/coprocessor-cache.md)
Expand Down Expand Up @@ -894,7 +895,7 @@
- [日期和时间类型](/data-type-date-and-time.md)
- [字符串类型](/data-type-string.md)
- [JSON 类型](/data-type-json.md)
- [向量数据类型](/vector-search-data-types.md)
- [向量数据类型](/vector-search/vector-search-data-types.md)
- 函数与操作符
- [函数与操作符概述](/functions-and-operators/functions-and-operators-overview.md)
- [表达式求值的类型转换](/functions-and-operators/type-conversion-in-expression-evaluation.md)
Expand All @@ -908,7 +909,7 @@
- [加密和压缩函数](/functions-and-operators/encryption-and-compression-functions.md)
- [锁函数](/functions-and-operators/locking-functions.md)
- [信息函数](/functions-and-operators/information-functions.md)
- [向量函数和操作符](/vector-search-functions-and-operators.md)
- [向量函数和操作符](/vector-search/vector-search-functions-and-operators.md)
- JSON 函数
- [概览](/functions-and-operators/json-functions.md)
- [创建 JSON 的函数](/functions-and-operators/json-functions/json-functions-create.md)
Expand All @@ -929,7 +930,7 @@
- [TiDB 特有的函数](/functions-and-operators/tidb-functions.md)
- [Oracle 与 TiDB 函数和语法差异对照](/oracle-functions-to-tidb.md)
- [聚簇索引](/clustered-indexes.md)
- [向量索引](/vector-search-index.md)
- [向量索引](/vector-search/vector-search-index.md)
- [约束](/constraints.md)
- [生成列](/generated-columns.md)
- [SQL 模式](/sql-mode.md)
Expand Down Expand Up @@ -1077,20 +1078,24 @@
- [版本发布时间线](/releases/release-timeline.md)
- [TiDB 版本规则](/releases/versioning.md)
- [TiDB 离线包](/binary-package.md)
- v8.5
- [8.5.0](/releases/release-8.5.0.md)
- v8.4
- [8.4.0-DMR](/releases/release-8.4.0.md)
- v8.3
- [8.3.0-DMR](/releases/release-8.3.0.md)
- v8.2
- [8.2.0-DMR](/releases/release-8.2.0.md)
- v8.1
- [8.1.2](/releases/release-8.1.2.md)
- [8.1.1](/releases/release-8.1.1.md)
- [8.1.0](/releases/release-8.1.0.md)
- v8.0
- [8.0.0-DMR](/releases/release-8.0.0.md)
- v7.6
- [7.6.0-DMR](/releases/release-7.6.0.md)
- v7.5
- [7.5.5](/releases/release-7.5.5.md)
- [7.5.4](/releases/release-7.5.4.md)
- [7.5.3](/releases/release-7.5.3.md)
- [7.5.2](/releases/release-7.5.2.md)
Expand Down
2 changes: 1 addition & 1 deletion alert-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ aliases: ['/docs-cn/dev/alert-rules/','/docs-cn/dev/reference/alert-rules/']

1. 从 TiDB 日志中查看慢查询日志,看查询是否用到了索引或全表扫,或者看是否需要做 analyze。
2. 排查是否有热点。
3. 查看 Coprocessor 监控,看 `coporcessor table/index scan``total``process` 是否匹配。如果相差太大,表明做了太多的无效查询。看是否有 `over seek bound`,如果有,表明版本太多,GC 工作不及时,需要增大并行 GC 的线程数。
3. 查看 Coprocessor 监控,看 `coprocessor table/index scan``total``process` 是否匹配。如果相差太大,表明做了太多的无效查询。看是否有 `over seek bound`,如果有,表明版本太多,GC 工作不及时,需要增大并行 GC 的线程数。

#### `TiKV_raftstore_thread_cpu_seconds_total`

Expand Down
6 changes: 4 additions & 2 deletions analyze-slow-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ summary: 学习如何定位和分析慢查询。

如上图,发给 `10.6.131.78` 的一个 `cop-task` 等待了 110ms 才被执行,可以判断是当时该实例忙,此时可以打开当时的 CPU 监控辅助判断。

#### 过期 key
#### 过期 MVCC 版本和 key 过多

如果 TiKV 上过期的数据比较多,在扫描的时候则需要处理这些不必要的数据,影响处理速度
如果 TiKV 上过期 MVCC 版本过多,或 GC 历史版本数据的保留时间长,导致累积了过多 MVCC。处理这些不必要的 MVCC 版本会影响扫描速度

这可以通过 `Total_keys``Processed_keys` 判断,如果两者相差较大,则说明旧版本的 key 太多:

Expand All @@ -108,6 +108,8 @@ summary: 学习如何定位和分析慢查询。
...
```

TiDB v8.5.0 引入了内存引擎功能,可以加速这类慢查询。详见 [TiKV MVCC 内存引擎](/tikv-in-memory-engine.md)

### 其他关键阶段慢

#### 取 TS 慢
Expand Down
Loading

0 comments on commit ad56c44

Please sign in to comment.