From 0b4609b53c31d09b33e9b0717bca66d808755b20 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 6 Sep 2024 16:10:04 +0800 Subject: [PATCH 001/127] releases: add release notes for v8.4.0 --- releases/release-8.4.0.md | 194 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 releases/release-8.4.0.md diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md new file mode 100644 index 000000000000..e40aaf8de8b6 --- /dev/null +++ b/releases/release-8.4.0.md @@ -0,0 +1,194 @@ +--- +title: TiDB 8.4.0 Release Notes +summary: 了解 TiDB 8.4.0 版本的新功能、兼容性变更、改进提升,以及错误修复。 +--- + +# TiDB 8.4.0 Release Notes + +发版日期:2024 年 xx 月 xx 日 + +TiDB 版本:8.4.0 + +试用链接:[快速体验](https://docs.pingcap.com/zh/tidb/v8.4/quick-start-with-tidb) | [下载离线包](https://cn.pingcap.com/product-community/?version=v8.4.0-DMR#version-list) + +在 8.4.0 版本中,你可以获得以下关键特性: + +## 功能详情 + +### 可扩展性 + +* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + + 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + + 更多信息,请参考[用户文档](链接)。 + +### 性能 + +* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + + 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + + 更多信息,请参考[用户文档](链接)。 + +### 稳定性 + +* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + + 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + + 更多信息,请参考[用户文档](链接)。 + +### 高可用 + +* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + + 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + + 更多信息,请参考[用户文档](链接)。 + +### SQL 功能 + +* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + + 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + + 更多信息,请参考[用户文档](链接)。 + +### 数据库管理 + +* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + + 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + + 更多信息,请参考[用户文档](链接)。 + +### 可观测性 + +* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + + 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + + 更多信息,请参考[用户文档](链接)。 + +### 安全 + +* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + + 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + + 更多信息,请参考[用户文档](链接)。 + +### 数据迁移 + +* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + + 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + + 更多信息,请参考[用户文档](链接)。 + +## 兼容性变更 + +> **注意:** +> +> 以下为从 v8.3.0 升级至当前版本 (v8.4.0) 所需兼容性变更信息。如果从 v8.2.0 或之前版本升级到当前版本,可能也需要考虑和查看中间版本 Release Notes 中提到的兼容性变更信息。 + +### 行为变更 + +* 行为变更 1 + +### 系统变量 + +| 变量名 | 修改类型(包括新增/修改/删除) | 描述 | +|--------|------------------------------|------| +| | | | +| | | | +| | | | +| | | | + +### 配置文件参数 + +| 配置文件 | 配置项 | 修改类型 | 描述 | +| -------- | -------- | -------- | -------- | +| | | | | +| | | | | +| | | | | +| | | | | + +### 系统表 + +## 离线包变更 + +## 废弃功能 + +* 以下为从 v8.4.0 开始已废弃的功能: + + * 废弃功能 1 + +* 以下为计划将在未来版本中废弃的功能: + + * TiDB 在 v8.0.0 引入了系统变量 [`tidb_enable_auto_analyze_priority_queue`](/system-variables.md#tidb_enable_auto_analyze_priority_queue-从-v800-版本开始引入),用于控制是否启用优先队列来优化自动收集统计信息任务的排序。在未来版本中,优先队列将成为自动收集统计信息任务的唯一排序方式,系统变量 [`tidb_enable_auto_analyze_priority_queue`](/system-variables.md#tidb_enable_auto_analyze_priority_queue-从-v800-版本开始引入) 将被废弃。 + * TiDB 在 v7.5.0 引入了系统变量 [`tidb_enable_async_merge_global_stats`](/system-variables.md#tidb_enable_async_merge_global_stats-从-v750-版本开始引入),用于设置 TiDB 使用异步方式合并分区统计信息,以避免 OOM 问题。在未来版本中,分区统计信息将统一使用异步方式进行合并,系统变量 [`tidb_enable_async_merge_global_stats`](/system-variables.md#tidb_enable_async_merge_global_stats-从-v750-版本开始引入) 将被废弃。 + * 计划在后续版本重新设计[执行计划绑定的自动演进](/sql-plan-management.md#自动演进绑定-baseline-evolution),相关的变量和行为会发生变化。 + * TiDB 在 v8.0.0 引入了系统变量 [`tidb_enable_parallel_hashagg_spill`](/system-variables.md#tidb_enable_parallel_hashagg_spill-从-v800-版本开始引入),用于控制 TiDB 是否支持并行 HashAgg 进行落盘。在未来版本中,系统变量 [`tidb_enable_parallel_hashagg_spill`](/system-variables.md#tidb_enable_parallel_hashagg_spill-从-v800-版本开始引入) 将被废弃。 + * TiDB Lightning 参数 [`conflict.max-record-rows`](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-任务配置) 计划在未来版本中废弃,并在后续版本中删除。该参数将由 [`conflict.threshold`](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-任务配置) 替代,即记录的冲突记录数和单个导入任务允许出现的冲突记录数的上限数保持一致。 + +* 以下为计划将在未来版本中移除的功能: + + * 从 v8.0.0 开始,TiDB Lightning 废弃了物理导入模式下的[旧版冲突检测](/tidb-lightning/tidb-lightning-physical-import-mode-usage.md#旧版冲突检测从-v800-开始已被废弃)策略,支持通过 [`conflict.strategy`](/tidb-lightning/tidb-lightning-configuration.md#tidb-lightning-任务配置) 参数统一控制逻辑导入和物理导入模式的冲突检测策略。旧版冲突检测的参数 [`duplicate-resolution`](/tidb-lightning/tidb-lightning-configuration.md) 将在未来版本中被移除。 + +## 改进提升 + ++ TiDB + ++ TiKV + ++ PD + ++ TiFlash + ++ Tools + + + Backup & Restore (BR) + + + TiCDC + + + TiDB Data Migration (DM) + + + TiDB Lightning + + + Dumpling + + + TiUP + + + TiDB Binlog + +## 错误修复 + ++ TiDB + ++ TiKV + ++ PD + ++ TiFlash + ++ Tools + + + Backup & Restore (BR) + + + TiCDC + + + TiDB Data Migration (DM) + + + TiDB Lightning + + + Dumpling + + + TiUP + + + TiDB Binlog + +## 贡献者 + +感谢来自 TiDB 社区的贡献者们: From 26e35c9c832e6c441a3cf25ff8cfd4bcb2b8c23a Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:15:39 +0800 Subject: [PATCH 002/127] Update release-8.4.0.md update release notes --- releases/release-8.4.0.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index e40aaf8de8b6..4fb490ac57e4 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -31,6 +31,19 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](链接)。 +* 增加获取 TSO 的 RPC 模式,降低获取 TSO 的延迟 [#54960](https://github.com/pingcap/tidb/issues/54960) @[MyonKeminta](https://github.com/MyonKeminta) **tw@qiancai** + + TiDB 在向 PD 请求 TSO 时,会将一段时间内的请求汇总起来并以同步的方式进行批处理,以减少 RPC (Remote Procedure Call) 请求数量从而降低 PD 负载。对于延迟敏感的场景,这种模式的性能并不理想。在 v8.4.0 中,TiDB 新增 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。你可以通过 [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) 变量设定获取 TSO 的 RPC 模式。 + + 更多信息,请参考[用户文档](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入)。 + +* 支持下推以下字符串函数到 TiKV [#](https://github.com/pingcap/tidb/issues/) @[gengliqi](https://github.com/gengliqi) **tw@qiancai** + + * `DATE_ADD()` + * `DATE_SUB()` + + 更多信息,请参考[用户文档](/functions-and-operators/expressions-pushed-down.md)。 + ### 稳定性 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** @@ -55,6 +68,15 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](链接)。 +* 支持向量搜索功能(实验特性) [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@qiancai** + + 向量搜索是一种优先考虑数据语义以提供相关结果的搜索方法,是 AI 和语言大模型的重要基础功能之一。通过向量索引,加速向量搜索的性能,数据库能够针对不同的距离函数快速查询相似向量,从而支撑 检索增强生成 (Retrieval-Augmented Generation, RAG)、语义搜索、推荐引擎等多种场景。 + TiDB 从 v8.4 版本开始,支持向量数据类型和向量索引,提供强大的向量搜索能力。TiDB 的向量数据类型支持最大 16383 维度,支持的距离函数包括:L2 距离(欧式距离)、余弦距离、负内积、L1 距离(曼哈顿距离)。 + 使用时,创建包含向量类型的表并写入数据后,就可以进行向量搜索查询,或向量和传统关系数据的混合查询。 + TiDB 的向量索引依赖于 TiFlash。因此,使用向量索引前,需要先为你的 TiDB 集群增加 TiFlash 节点。 + + 更多信息,请参考[用户文档](/vector-search-overview.md)。 + ### 数据库管理 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** @@ -140,7 +162,10 @@ TiDB 版本:8.4.0 ## 改进提升 + TiDB - + - 优化扫描大量 region 场景下的执行效率 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + - 优化 MEMDB 实现,降低事务中的写操作延时 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** + - 优化处理大量数据的 DML 性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** + + TiKV + PD From 55ec1df06e50c9a741ef356f96b5b7d4842dc4fd Mon Sep 17 00:00:00 2001 From: Roger Song Date: Wed, 11 Sep 2024 19:10:11 +0800 Subject: [PATCH 003/127] Do not allow cardinality to go below 1 --- releases/release-8.4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 4fb490ac57e4..7feb6e140dd4 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -165,6 +165,7 @@ TiDB 版本:8.4.0 - 优化扫描大量 region 场景下的执行效率 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - 优化 MEMDB 实现,降低事务中的写操作延时 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - 优化处理大量数据的 DML 性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** + - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** + TiKV From d58b260bbc764fce73ad7ccd7e8a3bf3777e65eb Mon Sep 17 00:00:00 2001 From: Roger Song Date: Wed, 11 Sep 2024 20:44:01 +0800 Subject: [PATCH 004/127] include the enhancements made for runaway queries --- releases/release-8.4.0.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 7feb6e140dd4..9203ee387141 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -52,6 +52,22 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](链接)。 +* 超出预期的查询 (Runaway Queries) 新增 "处理行数" 和 RU 作为阈值 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** + + TiDB 在 v8.4.0 可以依据 "处理行数 (`PROCESSED_KEYS`)" 和 "Request Unit (`RU`)" 定义超出预期的查询。和"执行时间(`EXEC_ELAPSED`)"相比,新增阈值能够更准确的定义查询的资源消耗,避免整体性能下降时发生识别偏差。 + + 支持同时设置多个条件,满足任意条件即识别为 `Runaway Queries`。 + + 用户可以观测 [`Statement Summary Tables`](/statement-summary-tables.md) 中的几个对应字段 (`RESOURCE_GROUP`、`MAX_REQUEST_UNIT_WRITE`、`MAX_REQUEST_UNIT_READ`、`MAX_PROCESSED_KEYS`),根据历史执行情况决定条件值的大小。 + + 更多信息,请参考[用户文档](/tidb-resource-control.md#管理资源消耗超出预期的查询-runaway-queries)。 + +* 超出预期的查询 (Runaway Queries) 支持切换资源组 [#issue号](链接) @[JmPotato](https://github.com/JmPotato) **tw@hfxsd** + + v8.4.0 新增支持将 `Runaway Queries` 切换到指定资源组。在降低优先级 (COOLDOWN) 仍旧无法有效降低资源消耗的情况下,用户可以创建一个资源组 [`RESOURCE GROUP`](/tidb-resource-control.md#管理资源组),并指定将识别到的查询切换到该资源组中,会话的后续查询仍旧会遵循原资源组。切换资源组的行为能够更精确地限制资源使用,对 `Runaway Queries` 的资源消耗做更加严格的控制。 + + 更多信息,请参考[用户文档](/tidb-resource-control.md#管理资源消耗超出预期的查询-runaway-queries)。 + ### 高可用 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** @@ -166,6 +182,7 @@ TiDB 版本:8.4.0 - 优化 MEMDB 实现,降低事务中的写操作延时 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - 优化处理大量数据的 DML 性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** + - 为日志表 [`mysql.tidb_runaway_queries`] 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** + TiKV From 431c004b9c88e5930934e3b6393dd5e104d7ed09 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Wed, 11 Sep 2024 21:30:58 +0800 Subject: [PATCH 005/127] fix the link for tidb_runaway_queries --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 9203ee387141..d17876467b5c 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -182,7 +182,7 @@ TiDB 版本:8.4.0 - 优化 MEMDB 实现,降低事务中的写操作延时 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - 优化处理大量数据的 DML 性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - - 为日志表 [`mysql.tidb_runaway_queries`] 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** + - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** + TiKV From fbf7c60777faa2b5035acd65ad9702a3371e167c Mon Sep 17 00:00:00 2001 From: Roger Song Date: Wed, 11 Sep 2024 23:21:29 +0800 Subject: [PATCH 006/127] enable tidb_enable_inl_join_inner_multi_pattern by default --- releases/release-8.4.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index d17876467b5c..c1d40f466c35 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -139,7 +139,7 @@ TiDB 版本:8.4.0 | 变量名 | 修改类型(包括新增/修改/删除) | 描述 | |--------|------------------------------|------| -| | | | +| [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值改为 `ON`。当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join | | | | | | | | | | | | | @@ -183,6 +183,7 @@ TiDB 版本:8.4.0 - 优化处理大量数据的 DML 性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** + - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** + TiKV From cc01d2f6e5bbfaf52e949242a5e6aa61b8d054a6 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Thu, 12 Sep 2024 14:50:02 +0800 Subject: [PATCH 007/127] Include CPU usage (TiDB, TiKV) in system tables --- releases/release-8.4.0.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index c1d40f466c35..d1893d529a06 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -109,6 +109,16 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](链接)。 +* 在系统表中显示 TiDB 和 TiKV 的 CPU 时间 [#55542](https://github.com/pingcap/tidb/issues/55542) @[yibin87](https://github.com/yibin87) **tw@hfxsd** + + [TiDB Dashboard](/dashboard/dashboard-intro.md) 的 [TOP SQL 页面](/dashboard/top-sql.md)能够展示 CPU 消耗高的 SQL 语句。v8.4.0 开始,TiDB 将 CPU 时间消耗信息加入系统表展示,与会话或 SQL 的其他指标并列,方便客户从多角度对高 CPU 消耗的操作进行观测。在实例 CPU 飙升 或集群读写热点的场景下,这些信息能够协助客户快速发现问题的原因。 + + - [`STATEMENTS_SUMMARY`](/statement-summary-tables.md) 增加 `AVG_TIDB_CPU_TIME` 和 `AVG_TIKV_CPU_TIME`,显示单个 SQL 语句在历史上消耗的平均 CPU 时间。 + - [`INFORMATION_SCHEMA.PROCESSLIST`](/information-schema/information-schema-processlist.md) 增加 `TIDB_CPU` 和 `TIKV_CPU`,显示会话当前正在执行 SQL 的累计 CPU 消耗。 + - [慢日志](/analyze-slow-queries.md)中增加字段 `Tidb_cpu_time` 和 `Tikv_cpu_time`,显示被捕捉到的 SQL 语句的 CPU 时间。 + + 其中,TiKV 的 CPU 时间默认显示;采集 TiDB 的 CPU 时间会引入额外开销(大概在8%),因此仅在开启 [Top SQL 特性](/dashboard/top-sql.md)时,TiDB 的 CPU 时间才会显示为实际值,否则始终显示为 `0`。 + ### 安全 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** From 2c811d4e9e2b61f2c0cf3c239b740c87ae4eedd5 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Thu, 12 Sep 2024 15:30:56 +0800 Subject: [PATCH 008/127] Provide warnings for restoring data to a non-empty cluster (SQL Based BR) --- releases/release-8.4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index d1893d529a06..62499785037a 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -194,6 +194,7 @@ TiDB 版本:8.4.0 - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** + - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + TiKV From 05f2bc082ac4c76625e20a9c541929e2f68b34a9 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Thu, 12 Sep 2024 15:53:28 +0800 Subject: [PATCH 009/127] DELETE fetches partial columns for cop tasks --- releases/release-8.4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 62499785037a..ca6695b66512 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -195,6 +195,7 @@ TiDB 版本:8.4.0 - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + - 减少部分场景的 DELETE 操作从 TiKV 获取的列信息数量,降低 DELETE 操作的资源开销。[#issue号](链接) [winoros](https://github.com/winoros) **tw@Oreoxmt** + TiKV From a44e541ccb4ca92772211edf2c17cf52ae1506ff Mon Sep 17 00:00:00 2001 From: Roger Song Date: Thu, 12 Sep 2024 16:53:28 +0800 Subject: [PATCH 010/127] Introduce additional labels to TOP SQL --- releases/release-8.4.0.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index ca6695b66512..3c573355a776 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -119,6 +119,12 @@ TiDB 版本:8.4.0 其中,TiKV 的 CPU 时间默认显示;采集 TiDB 的 CPU 时间会引入额外开销(大概在8%),因此仅在开启 [Top SQL 特性](/dashboard/top-sql.md)时,TiDB 的 CPU 时间才会显示为实际值,否则始终显示为 `0`。 +* TOP SQL 可按 `Schema` 或 `Table` 维度聚合 [#issue号](链接) @[nolouch](https://github.com/nolouch) **tw@lilin90** + + 当前的 [TOP SQL](/dashboard/top-sql.md) 以 SQL 为单位来聚合 CPU 时间。如果 CPU 时间不是由少数几个 SQL 贡献,按 SQL 聚合并不能有效发现问题。从 v8.4.0 开始,用户可以选择按照 `Schema` 或 `Table` 聚合 CPU 时间。在多系统融合的场景下,新的聚合方式能够更有效地识别来自某个特定系统的负载变化,提升问题诊断的效率。 + + 更多信息,请参考[用户文档](/dashboard/top-sql.md)。 + ### 安全 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** From 4aa8c1f7c840ea534c679f94f76cef62969356db Mon Sep 17 00:00:00 2001 From: Roger Song Date: Thu, 12 Sep 2024 17:06:00 +0800 Subject: [PATCH 011/127] Maintain The Priority Queue In Memory V2 --- releases/release-8.4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 3c573355a776..5b26fd06f90e 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -202,6 +202,7 @@ TiDB 版本:8.4.0 - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** - 减少部分场景的 DELETE 操作从 TiKV 获取的列信息数量,降低 DELETE 操作的资源开销。[#issue号](链接) [winoros](https://github.com/winoros) **tw@Oreoxmt** + - 优化 Priority Queue 基于 Meta Cache V2 的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) [Rustin170506](https://github.com/Rustin170506) + TiKV From cd749b68fbf11e33cf6e2cdd2c3b94ed9798a5cb Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Thu, 12 Sep 2024 17:50:21 +0800 Subject: [PATCH 012/127] Update release-8.4.0.md --- releases/release-8.4.0.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 5b26fd06f90e..2a31f78cbd2d 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -37,7 +37,13 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入)。 -* 支持下推以下字符串函数到 TiKV [#](https://github.com/pingcap/tidb/issues/) @[gengliqi](https://github.com/gengliqi) **tw@qiancai** +* 优化 TiDB 的 Hash Join 算子实现效率(实验特性) [#55153](https://github.com/pingcap/tidb/issues/55153) [#53127](https://github.com/pingcap/tidb/issues/53127) @[windtalker](https://github.com/windtalker) @[xzhangxian1008](https://github.com/xzhangxian1008) @[XuHuaiyu](https://github.com/XuHuaiyu) @[wshwsh12](https://github.com/wshwsh12) **tw@qiancai** + + 在 v8.4.0 版本之前,TiDB 的 Hash Join 算子实现效率不高。从 v8.4.0 开始,TiDB 将对 Hash Join 算子进行重构优化,提升执行效率。在 v8.4.0 版本,该功能为实验特性,只有 INNER JOIN 和 OUTER JOIN 可以使用重构后的高性能 Hash Join 算子。当该功能启用时,执行器会根据高性能 Hash Join 算子对关联操作的支持情况,自动选择是否使用高性能 Hash Join 算子。你可以通过 [tidb_hash_join_use_new_impl](/system-variables.md#tidb_hash_join_use_new_impl-从-v840-版本开始引入) 变量控制是否启用高性能 Hash Join 算子。 + + 更多信息,请参考[用户文档](/system-variables.md#tidb_hash_join_use_new_impl-从-v840-版本开始引入)。 + +* 支持下推以下字符串函数到 TiKV [#17529](https://github.com/tikv/tikv/issues/17529) @[gengliqi](https://github.com/gengliqi) **tw@qiancai** * `DATE_ADD()` * `DATE_SUB()` @@ -84,7 +90,7 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](链接)。 -* 支持向量搜索功能(实验特性) [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@qiancai** +* 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[贡献者 GitHub ID](链接) **tw@qiancai** 向量搜索是一种优先考虑数据语义以提供相关结果的搜索方法,是 AI 和语言大模型的重要基础功能之一。通过向量索引,加速向量搜索的性能,数据库能够针对不同的距离函数快速查询相似向量,从而支撑 检索增强生成 (Retrieval-Augmented Generation, RAG)、语义搜索、推荐引擎等多种场景。 TiDB 从 v8.4 版本开始,支持向量数据类型和向量索引,提供强大的向量搜索能力。TiDB 的向量数据类型支持最大 16383 维度,支持的距离函数包括:L2 距离(欧式距离)、余弦距离、负内积、L1 距离(曼哈顿距离)。 @@ -194,9 +200,9 @@ TiDB 版本:8.4.0 ## 改进提升 + TiDB - - 优化扫描大量 region 场景下的执行效率 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - - 优化 MEMDB 实现,降低事务中的写操作延时 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - - 优化处理大量数据的 DML 性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** + - 优化扫描大量数据时构造 Batch Cop Task 的效率 [#55915](https://github.com/pingcap/tidb/issues/55915) [#55413](https://github.com/pingcap/tidb/issues/55413) @[wshwsh12](https://github.com/wshwsh12) **tw@caiqian** + - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** + - 优化处理大量数据 DML 的性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** From 548b9651a406810ca9466ca0f94aea2685069487 Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Thu, 12 Sep 2024 17:55:38 +0800 Subject: [PATCH 013/127] Update release-8.4.0.md --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 2a31f78cbd2d..00833a832a72 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -90,7 +90,7 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](链接)。 -* 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[贡献者 GitHub ID](链接) **tw@qiancai** +* 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) **tw@qiancai** 向量搜索是一种优先考虑数据语义以提供相关结果的搜索方法,是 AI 和语言大模型的重要基础功能之一。通过向量索引,加速向量搜索的性能,数据库能够针对不同的距离函数快速查询相似向量,从而支撑 检索增强生成 (Retrieval-Augmented Generation, RAG)、语义搜索、推荐引擎等多种场景。 TiDB 从 v8.4 版本开始,支持向量数据类型和向量索引,提供强大的向量搜索能力。TiDB 的向量数据类型支持最大 16383 维度,支持的距离函数包括:L2 距离(欧式距离)、余弦距离、负内积、L1 距离(曼哈顿距离)。 @@ -200,7 +200,7 @@ TiDB 版本:8.4.0 ## 改进提升 + TiDB - - 优化扫描大量数据时构造 Batch Cop Task 的效率 [#55915](https://github.com/pingcap/tidb/issues/55915) [#55413](https://github.com/pingcap/tidb/issues/55413) @[wshwsh12](https://github.com/wshwsh12) **tw@caiqian** + - 优化扫描大量数据时构造 BatchCop Task 的效率 [#55915](https://github.com/pingcap/tidb/issues/55915) [#55413](https://github.com/pingcap/tidb/issues/55413) @[wshwsh12](https://github.com/wshwsh12) **tw@caiqian** - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** - 优化处理大量数据 DML 的性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** From b63d7d4c10c71c2d6d2cfb9751332d7afca52962 Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Thu, 12 Sep 2024 18:23:40 +0800 Subject: [PATCH 014/127] Update release-8.4.0.md --- releases/release-8.4.0.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 00833a832a72..32585dfa1441 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -82,6 +82,19 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](链接)。 +* TiProxy 支持流量回放功能(实验特性) [#642](https://github.com/pingcap/tiproxy/issues/642) @[djshow832](https://github.com/djshow832) **tw@Oreoxmt** + + 从 TiProxy v1.3.0 版本开始,TiProxy 将支持流量捕获回放功能。该功能可以从一个 TiDB 集群中捕获所有的访问流量,并在另外的集群中按照指定的速率进行回放,验证所有 SQL 的执行结果和性能。 + + 该功能适用于以下场景: + - TiDB 版本升级验证 + - 配置变更验证 + - 扩缩容性能验证 + - 测试集群性能上限 + 在 v8.4.0 版本,你可以连接 TiProxy 实例,通过 `tiproxyctrl` 命令进行流量捕获、回放。 + + 更多信息,请参考[用户文档](/tiproxy/tiproxy-traffic-replay.md)。 + ### SQL 功能 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** @@ -92,10 +105,12 @@ TiDB 版本:8.4.0 * 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) **tw@qiancai** - 向量搜索是一种优先考虑数据语义以提供相关结果的搜索方法,是 AI 和语言大模型的重要基础功能之一。通过向量索引,加速向量搜索的性能,数据库能够针对不同的距离函数快速查询相似向量,从而支撑 检索增强生成 (Retrieval-Augmented Generation, RAG)、语义搜索、推荐引擎等多种场景。 - TiDB 从 v8.4 版本开始,支持向量数据类型和向量索引,提供强大的向量搜索能力。TiDB 的向量数据类型支持最大 16383 维度,支持的距离函数包括:L2 距离(欧式距离)、余弦距离、负内积、L1 距离(曼哈顿距离)。 - 使用时,创建包含向量类型的表并写入数据后,就可以进行向量搜索查询,或向量和传统关系数据的混合查询。 - TiDB 的向量索引依赖于 TiFlash。因此,使用向量索引前,需要先为你的 TiDB 集群增加 TiFlash 节点。 + 向量搜索是一种基于数据语义的搜索方法,旨在提供更相关的搜索结果,是 AI 和大语言模型(LLM)的关键功能之一。通过使用向量索引,数据库能够加速向量搜索的性能,快速基于不同的距离函数查询相似向量,从而支持检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种应用场景。 + + 从 v8.4 版本开始,TiDB 支持向量数据类型和向量索引,具备强大的向量搜索能力。TiDB 的向量数据类型最多可支持 16383 维度,并提供多种距离函数支持,包括 L2 距离(欧式距离)、余弦距离、负内积和 L1 距离(曼哈顿距离)。 + + 在使用时,用户只需创建包含向量类型的表并插入数据,即可执行向量搜索查询,也可进行向量数据与传统关系数据的混合查询。 + 值得注意的是,TiDB 的向量索引依赖于 TiFlash,因此,在使用向量索引之前,需要确保 TiDB 集群中已添加 TiFlash 节点。 更多信息,请参考[用户文档](/vector-search-overview.md)。 @@ -202,7 +217,7 @@ TiDB 版本:8.4.0 + TiDB - 优化扫描大量数据时构造 BatchCop Task 的效率 [#55915](https://github.com/pingcap/tidb/issues/55915) [#55413](https://github.com/pingcap/tidb/issues/55413) @[wshwsh12](https://github.com/wshwsh12) **tw@caiqian** - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** - - 优化处理大量数据 DML 的性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** + - 优化 BULK 模式 DML 的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** From 5eaac1bf8e60189c8d18e992643fae1528905e08 Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Thu, 12 Sep 2024 18:31:32 +0800 Subject: [PATCH 015/127] Update release-8.4.0.md --- releases/release-8.4.0.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 32585dfa1441..1ec32d0a13c6 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -84,14 +84,15 @@ TiDB 版本:8.4.0 * TiProxy 支持流量回放功能(实验特性) [#642](https://github.com/pingcap/tiproxy/issues/642) @[djshow832](https://github.com/djshow832) **tw@Oreoxmt** - 从 TiProxy v1.3.0 版本开始,TiProxy 将支持流量捕获回放功能。该功能可以从一个 TiDB 集群中捕获所有的访问流量,并在另外的集群中按照指定的速率进行回放,验证所有 SQL 的执行结果和性能。 + 从 TiProxy v1.3.0 版本开始,TiProxy 将支持流量捕获回放功能。该功能可以从一个 TiDB 集群中捕获所有的访问流量,并在另外的集群中按照指定的速率进行回放,验证所有 SQL 的执行结果和性能表现。 该功能适用于以下场景: - TiDB 版本升级验证 - - 配置变更验证 + - 集群变更效果评估 - 扩缩容性能验证 - 测试集群性能上限 - 在 v8.4.0 版本,你可以连接 TiProxy 实例,通过 `tiproxyctrl` 命令进行流量捕获、回放。 + + 你可以连接 TiProxy 实例,通过 `tiproxyctrl` 命令进行流量捕获、回放。 更多信息,请参考[用户文档](/tiproxy/tiproxy-traffic-replay.md)。 From 1e8c541dcdf28946fdd433c29ed2beb7adac90a9 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Thu, 12 Sep 2024 20:21:59 +0800 Subject: [PATCH 016/127] Introduce limit for background tasks --- releases/release-8.4.0.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 5b26fd06f90e..5ba11fd6f580 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -68,6 +68,12 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/tidb-resource-control.md#管理资源消耗超出预期的查询-runaway-queries)。 +* 资源管控为后台任务设置资源上限 [#issue号](链接) @[glorv](https://github.com/glorv) **tw@hfxsd** + + TiDB 资源管控能够识别并降低后台任务的运行优先级。在部分场景下,即使有空闲资源,客户希望后台任务消耗能够控制在很低的水平。在新版本中,资源管控可以通过 `UTILIZATION_LIMIT` 指令为后台任务设置资源百分比,每个节点把所有后台任务的使用量控制在这个百分比以下。精细控制后台任务的资源占用,进一步提升集群稳定性。 + + 更多信息,请参考[用户文档](/tidb-resource-control.md#管理后台任务)。 + ### 高可用 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** From 1ef6b8e599e73af66a3d481e08f5951142ed9309 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Thu, 12 Sep 2024 22:16:46 +0800 Subject: [PATCH 017/127] instance plan cache as experimental --- releases/release-8.4.0.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index d23766109257..d42a1775a098 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -50,6 +50,17 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/functions-and-operators/expressions-pushed-down.md)。 +* 实例中的会话共享执行计划缓存 (实验特性) [#issue号](链接) @[qw4990](https://github.com/qw4990) **tw@Oreoxmt** + + 相比会话级执行计划缓存,执行计划缓存在会话间共享有明显的优势: + + - 消除冗余,相同的内存消耗下能缓存更多的执行计划。 + - 在实例上开辟固定大小的内存区域,能更有效的对内存进行限制。 + + 在 v8.4.0 中,实例级执行计划缓存作为实验特性,只支持对查询的执行计划进行缓存,默认关闭,通过设置系统变量 [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入) 开启,缓存最大值通过变量 [`tidb_instance_plan_cache_max_mem_size`](/system-variables.md#tidb_instance_plan_cache_max_mem_size-从-v840-版本开始引入) 设置,当缓存大小超过变量 [`tidb_instance_plan_cache_target_mem_size`](/system-variables.md#tidb_instance_plan_cache_target_mem_size-从-v840-版本开始引入) 设置的值时开始清理。会话执行计划缓存需要保持关闭状态,具体参见 [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md) 和 [非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 + + 实例级执行计划缓存能够大幅降低 TiDB 的时延,提升集群吞吐,并能够减少执行计划突变的机会,保持集群性能的稳定,是 TiDB 改善性能和稳定性的重要改进。 + ### 稳定性 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** @@ -184,9 +195,9 @@ TiDB 版本:8.4.0 | 变量名 | 修改类型(包括新增/修改/删除) | 描述 | |--------|------------------------------|------| | [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值改为 `ON`。当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join | -| | | | -| | | | -| | | | +| [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)| 新增 | 这个变量控制是否开启 Instance Plan Cache 功能。 | +| [`tidb_instance_plan_cache_max_mem_size`](/system-variables.md#tidb_instance_plan_cache_max_mem_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的目标内存大小,超过这个大小则触发清理。| +| [`tidb_instance_plan_cache_target_mem_size`](/system-variables.md#tidb_instance_plan_cache_target_mem_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的最大内存使用量。 | ### 配置文件参数 From 196961e082fedf6274e4cc982107c3abad7e3137 Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Fri, 13 Sep 2024 10:59:37 +0800 Subject: [PATCH 018/127] Update release-8.4.0.md --- releases/release-8.4.0.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index d42a1775a098..2fe1829e7016 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -101,15 +101,15 @@ TiDB 版本:8.4.0 * TiProxy 支持流量回放功能(实验特性) [#642](https://github.com/pingcap/tiproxy/issues/642) @[djshow832](https://github.com/djshow832) **tw@Oreoxmt** - 从 TiProxy v1.3.0 版本开始,TiProxy 将支持流量捕获回放功能。该功能可以从一个 TiDB 集群中捕获所有的访问流量,并在另外的集群中按照指定的速率进行回放,验证所有 SQL 的执行结果和性能表现。 - + 从 TiProxy v1.3.0 版本开始,TiProxy 将支持流量捕获回放功能。该功能可以从 TiDB 生产集群中捕获所有的访问流量,并在测试集群中按照指定的速率进行回放,验证所有 SQL 的执行结果和性能表现。 + 该功能适用于以下场景: - - TiDB 版本升级验证 - - 集群变更效果评估 - - 扩缩容性能验证 + - TiDB 版本升级前验证 + - 执行变更前影响评估 + - TiDB 扩缩容前性能验证 - 测试集群性能上限 - - 你可以连接 TiProxy 实例,通过 `tiproxyctrl` 命令进行流量捕获、回放。 + + 你可以通过 `tiproxyctrl` 命令连接 TiProxy 实例,进行流量捕获、回放。 更多信息,请参考[用户文档](/tiproxy/tiproxy-traffic-replay.md)。 From c37457031aa64ca57c277c6e358fdbe8ffee0688 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 15:03:01 +0800 Subject: [PATCH 019/127] include workload repository in TiDB --- releases/release-8.4.0.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 2fe1829e7016..9bce4a63f1ce 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -148,6 +148,35 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](链接)。 +* 持久化部分内存表的快照 (实验特性) [#issue号](链接) @[xhebox](https://github.com/xhebox) **tw@lilin90** + + TiDB 的内存表中会保存很多运行时状态信息,比如会话状态、锁状态、SQL 运行状态等,用户可以据此了解数据库运行情况,这些信息被大量用在故障诊断和性能调优的场景。实际使用中会遇到几个问题: + + - 内存表中的信息会随 TiDB 实例的关闭而消失 + - 用户无法追溯过去某个时间的状态信息 + + 为了解决上述问题,受流行商业数据库的启发,TiDB 新增对内存表持久化的能力,为 TiDB 构建 `Workload Repository`。通过设置变量 [`tidb_workload_repository_dest`]() 为 `SCHEMA`, TiDB 将内存表中的信息阶段性写入特定数据库 (`WORKLOAD_SCHEMA`),持久化到 TiKV 中。持久化的数据大体有两类用途: + + - **故障定位**:获取过去某一段时间的数据库运行情况,分析故障可能的原因。 + - **自动运维**:对数据库的历史负载进行分析,发现潜在的优化点,并得出优化建议。比如索引推荐,SQL 调优推荐等。 + + 被持久化的内存表大体分为两类: + + 一类是保存累计运行指标的内存表,通常体积较大,快照一次有明显开销。这类内存表默认每 60 分钟记录一次快照,通过系统变量 [`tidb_workload_repository_snapshot_interval`]() 修改快照间隔。包括: + + - SQL 语句运行指标 + - 索引运行指标 + + 另一类内存表显示实时状态信息,会被快速刷新。这类内存记录默认每秒采样一次,通过系统变量 [`tidb_workload_repository_active_sampling_interval`]() 修改采样间隔。这类表包括: + + - 活动会话的状态 + - 锁状态 + - 活动事务状态 + + TiDB `Workload Repository` 的引入,极大地提升了数据库的可观测性,并为未来的自动化运维工作提供了数据基础。在接下来的版本,TiDB 会加入更多的内存观测指标,并持久化到 `Workload Repository`,通过提供丰富的工具、报告、建议,协助用户的管理工作,提升运维 TiDB 集群的效率。 + + 更多信息,请参考[用户文档](链接)。 + * 在系统表中显示 TiDB 和 TiKV 的 CPU 时间 [#55542](https://github.com/pingcap/tidb/issues/55542) @[yibin87](https://github.com/yibin87) **tw@hfxsd** [TiDB Dashboard](/dashboard/dashboard-intro.md) 的 [TOP SQL 页面](/dashboard/top-sql.md)能够展示 CPU 消耗高的 SQL 语句。v8.4.0 开始,TiDB 将 CPU 时间消耗信息加入系统表展示,与会话或 SQL 的其他指标并列,方便客户从多角度对高 CPU 消耗的操作进行观测。在实例 CPU 飙升 或集群读写热点的场景下,这些信息能够协助客户快速发现问题的原因。 From 47b926c76c2fdeb1a69fadc920ca878f08c27b8b Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 16:50:19 +0800 Subject: [PATCH 020/127] update the variables for instance plan cache --- releases/release-8.4.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 9bce4a63f1ce..af6f64072499 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -57,7 +57,7 @@ TiDB 版本:8.4.0 - 消除冗余,相同的内存消耗下能缓存更多的执行计划。 - 在实例上开辟固定大小的内存区域,能更有效的对内存进行限制。 - 在 v8.4.0 中,实例级执行计划缓存作为实验特性,只支持对查询的执行计划进行缓存,默认关闭,通过设置系统变量 [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入) 开启,缓存最大值通过变量 [`tidb_instance_plan_cache_max_mem_size`](/system-variables.md#tidb_instance_plan_cache_max_mem_size-从-v840-版本开始引入) 设置,当缓存大小超过变量 [`tidb_instance_plan_cache_target_mem_size`](/system-variables.md#tidb_instance_plan_cache_target_mem_size-从-v840-版本开始引入) 设置的值时开始清理。会话执行计划缓存需要保持关闭状态,具体参见 [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md) 和 [非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 + 在 v8.4.0 中,实例级执行计划缓存作为实验特性,只支持对查询的执行计划进行缓存,默认关闭,通过设置系统变量 [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入) 开启,缓存最大值通过变量 [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) 设置。同时,会话执行计划缓存需要保持关闭状态,具体参见 [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md) 和 [非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 实例级执行计划缓存能够大幅降低 TiDB 的时延,提升集群吞吐,并能够减少执行计划突变的机会,保持集群性能的稳定,是 TiDB 改善性能和稳定性的重要改进。 @@ -225,8 +225,8 @@ TiDB 版本:8.4.0 |--------|------------------------------|------| | [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值改为 `ON`。当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join | | [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)| 新增 | 这个变量控制是否开启 Instance Plan Cache 功能。 | -| [`tidb_instance_plan_cache_max_mem_size`](/system-variables.md#tidb_instance_plan_cache_max_mem_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的目标内存大小,超过这个大小则触发清理。| -| [`tidb_instance_plan_cache_target_mem_size`](/system-variables.md#tidb_instance_plan_cache_target_mem_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的最大内存使用量。 | +| [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的目标内存大小,超过这个大小则触发清理。| + ### 配置文件参数 From a9a181676217d3783007ed6975cbb93a45b62a22 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 17:05:59 +0800 Subject: [PATCH 021/127] Enabling prepared statements for lightning (logical mode) --- releases/release-8.4.0.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index af6f64072499..2f99fed0aea2 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -61,6 +61,12 @@ TiDB 版本:8.4.0 实例级执行计划缓存能够大幅降低 TiDB 的时延,提升集群吞吐,并能够减少执行计划突变的机会,保持集群性能的稳定,是 TiDB 改善性能和稳定性的重要改进。 +* `Lightning` 的逻辑导入支持 prepare 接口 [#issue号](链接) @[qw4990](https://github.com/qw4990) **tw@lilin90** + + 通过开启配置 [`logical-import-prep-stmt`](),`Lightning` 逻辑导入产生的 SQL 语句将会通过 prepare 接口执行,提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 + + 更多信息,请参考[用户文档]() + ### 稳定性 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** From 160b5812ed95802b021c372ddfe2b048b3c763a9 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 17:09:14 +0800 Subject: [PATCH 022/127] fix issue# --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 2f99fed0aea2..18d1d51baecc 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -61,7 +61,7 @@ TiDB 版本:8.4.0 实例级执行计划缓存能够大幅降低 TiDB 的时延,提升集群吞吐,并能够减少执行计划突变的机会,保持集群性能的稳定,是 TiDB 改善性能和稳定性的重要改进。 -* `Lightning` 的逻辑导入支持 prepare 接口 [#issue号](链接) @[qw4990](https://github.com/qw4990) **tw@lilin90** +* `Lightning` 的逻辑导入支持 prepare 接口 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) @[qw4990](https://github.com/qw4990) **tw@lilin90** 通过开启配置 [`logical-import-prep-stmt`](),`Lightning` 逻辑导入产生的 SQL 语句将会通过 prepare 接口执行,提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 From b14ee6576e786bea6beef376273603fd26b320fc Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 18:28:59 +0800 Subject: [PATCH 023/127] Optimized strategy of resource control --- releases/release-8.4.0.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 18d1d51baecc..6c2b629ded48 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -97,6 +97,14 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/tidb-resource-control.md#管理后台任务)。 +* 优化资源组资源分配策略 [#issue号](链接) @[nolouch](https://github.com/nolouch) **tw@hfxsd** + + TiDB 在 v8.4.0 部分调整了资源分配策略,更好的满足客户对资源管控的预期。 + + - 拥有 `BURSTABLE` 属性的资源组,超出 `RU_PER_SEC` 的资源请求会被控制在一定范围内,降低对其他资源组产生的影响。 + - 控制大查询在运行时的资源分配,避免超出资源组限额。配合 Runaway Queries 的 `COOLDOWN` 动作,识别并降低大查询并发度,降低瞬时资源消耗。 + - 调整默认的优先级调度策略。当不同优先级的任务同时运行时,高优先级的任务获得更多资源。 + ### 高可用 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** From bfdfa4d2f77191ac7b08a12c742420620fdba267 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 18:49:12 +0800 Subject: [PATCH 024/127] Adaptive parallelism for stats collection in single TiDB instance --- releases/release-8.4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 6c2b629ded48..73574c9eea8f 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -285,6 +285,7 @@ TiDB 版本:8.4.0 - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** - 减少部分场景的 DELETE 操作从 TiKV 获取的列信息数量,降低 DELETE 操作的资源开销。[#issue号](链接) [winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化 Priority Queue 基于 Meta Cache V2 的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) [Rustin170506](https://github.com/Rustin170506) + - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + TiKV From 83eee7e1952f446f64ba56f5d1d96ea07f0ca8a9 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 18:59:44 +0800 Subject: [PATCH 025/127] br restore needs to honor split-table=false/split-region-on-table=false --- releases/release-8.4.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 73574c9eea8f..ca7355e974d9 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -281,11 +281,12 @@ TiDB 版本:8.4.0 - 优化 BULK 模式 DML 的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** + - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** - 减少部分场景的 DELETE 操作从 TiKV 获取的列信息数量,降低 DELETE 操作的资源开销。[#issue号](链接) [winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化 Priority Queue 基于 Meta Cache V2 的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) [Rustin170506](https://github.com/Rustin170506) - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + - 优化同时设置 `split-table=false` 和 `split-region-on-table=false` 时,集群恢复的 region 分配策略 [#issue号](链接) @[Leavrth](https://github.com/Leavrth) **tw@qiancai** + TiKV From 007abe2fd82f1038822e5a66fb097926047974db Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 19:19:01 +0800 Subject: [PATCH 026/127] move the enhancement of BR to the correct position --- releases/release-8.4.0.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index ca7355e974d9..79eebced270e 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -282,11 +282,9 @@ TiDB 版本:8.4.0 - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** - - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** - 减少部分场景的 DELETE 操作从 TiKV 获取的列信息数量,降低 DELETE 操作的资源开销。[#issue号](链接) [winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化 Priority Queue 基于 Meta Cache V2 的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) [Rustin170506](https://github.com/Rustin170506) - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** - - 优化同时设置 `split-table=false` 和 `split-region-on-table=false` 时,集群恢复的 region 分配策略 [#issue号](链接) @[Leavrth](https://github.com/Leavrth) **tw@qiancai** + TiKV @@ -298,6 +296,10 @@ TiDB 版本:8.4.0 + Backup & Restore (BR) + - 集群恢复时同时设置 `split-table=false` 和 `split-region-on-table=false`,优化 region 的分配策略 [#issue号](链接) @[Leavrth](https://github.com/Leavrth) + **tw@qiancai** + - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + + TiCDC + TiDB Data Migration (DM) From cf97283824264fd212ce965825eb7400fa862a43 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 19:31:06 +0800 Subject: [PATCH 027/127] larger region size for the compatibility to larger clusters. --- releases/release-8.4.0.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 79eebced270e..f88fcdc01144 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -288,6 +288,8 @@ TiDB 版本:8.4.0 + TiKV + - 默认 Region 大小由 96 MB 提升到 256 MB,避免 Region 数量过多带来的额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) + + PD + TiFlash From 761491a87aadb17e282bee38d3457ebb6124d01a Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 13 Sep 2024 22:10:41 +0800 Subject: [PATCH 028/127] Allow evicting leader scheduling when lightning importing --- releases/release-8.4.0.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index f88fcdc01144..0a43fcb0a3c7 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -292,6 +292,8 @@ TiDB 版本:8.4.0 + PD + - `Lightning` 导入过程中,允许 PD 做 `evict-leader` 调度来避免阻断 TiKV 的 offline 进程 [#issue号](链接) @[okJiang](https://github.com/okJiang) **tw@qiancai** + + TiFlash + Tools From 25a66b1df22a24fb79bde95f6f8d7de0079bb1d0 Mon Sep 17 00:00:00 2001 From: Aolin Date: Sat, 14 Sep 2024 11:43:11 +0800 Subject: [PATCH 029/127] Apply suggestions from code review Co-authored-by: Frank945946 <108602632+Frank945946@users.noreply.github.com> --- releases/release-8.4.0.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 0a43fcb0a3c7..6c4a65841bcf 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -49,7 +49,11 @@ TiDB 版本:8.4.0 * `DATE_SUB()` 更多信息,请参考[用户文档](/functions-and-operators/expressions-pushed-down.md)。 +* 提升批量创建用户和修改用户密码操作的性能,提升达数百倍 [#55604](https://github.com/pingcap/tidb/pull/55604) @[wjhuang2016](https://github.com/wjhuang2016) **tw@xxx** + 在 SaaS 场景下,存在批量创建大量用户,以及定期轮换所有用户密码的需求,且需要在指定时间窗口内完成,从 V8.3.0 开始,对批量创建用户,批量修改用户密码的性能做了提升,且用户可以通过增加 session 连接数来提升并发,提升性能,大大缩短了该场景下的执行时间。 + + 更多信息,请参考[用户文档](链接)。 * 实例中的会话共享执行计划缓存 (实验特性) [#issue号](链接) @[qw4990](https://github.com/qw4990) **tw@Oreoxmt** 相比会话级执行计划缓存,执行计划缓存在会话间共享有明显的优势: @@ -91,6 +95,11 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/tidb-resource-control.md#管理资源消耗超出预期的查询-runaway-queries)。 +* ‘tidb_scatter_region’ 支持设置集群级别的 region 打算策略 [#issue号](链接) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** + + ‘tidb_scatter_region’ 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打算策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。因此,从 V8.3.0 版本开始,将该系统变量改为字符串类型,且新增支持集群级别的打算策略,避免上述场景下导致 TiKV OOM 的问题。 + + 更多信息,请参考[用户文档](链接)。 * 资源管控为后台任务设置资源上限 [#issue号](链接) @[glorv](https://github.com/glorv) **tw@hfxsd** TiDB 资源管控能够识别并降低后台任务的运行优先级。在部分场景下,即使有空闲资源,客户希望后台任务消耗能够控制在很低的水平。在新版本中,资源管控可以通过 `UTILIZATION_LIMIT` 指令为后台任务设置资源百分比,每个节点把所有后台任务的使用量控制在这个百分比以下。精细控制后台任务的资源占用,进一步提升集群稳定性。 @@ -145,7 +154,11 @@ TiDB 版本:8.4.0 值得注意的是,TiDB 的向量索引依赖于 TiFlash,因此,在使用向量索引之前,需要确保 TiDB 集群中已添加 TiFlash 节点。 更多信息,请参考[用户文档](/vector-search-overview.md)。 - +* TiDB 外键约束检查功能成为正式功能(GA) [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@lilin90** + + TiDB 从 v6.6.0 版本开始,可通过变量 foreign_key_checks 做外键约束检查,但是其一直为实验特性。v8.3.0 对外键特性在更多场景做了覆盖测试,稳定性和性能方面也有一些提升,因此从 v8.3.0 开始外键功能成为正式功能(GA) + + 更多信息,请参考[用户文档](链接)。 ### 数据库管理 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** @@ -246,7 +259,7 @@ TiDB 版本:8.4.0 | 配置文件 | 配置项 | 修改类型 | 描述 | | -------- | -------- | -------- | -------- | -| | | | | +| TiKV | grpc-keepalive-timeout | 修改 | 该配置文件参数原先为 int 类型,且最小值仅支持设置为 1,从 v8.3.0 开始,数据类型修改为 float64 ,且最小值支持设置为 0.05,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | | | | | | | | | | | | | | | | @@ -285,7 +298,7 @@ TiDB 版本:8.4.0 - 减少部分场景的 DELETE 操作从 TiKV 获取的列信息数量,降低 DELETE 操作的资源开销。[#issue号](链接) [winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化 Priority Queue 基于 Meta Cache V2 的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) [Rustin170506](https://github.com/Rustin170506) - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** - + - ‘tidb_enable_fast_create_table’ 开启后,支持了批量快速创建外键表的场景。 [#issue号](链接) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** + TiKV - 默认 Region 大小由 96 MB 提升到 256 MB,避免 Region 数量过多带来的额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) From 0b1b51a3e93b0b9e0377b100eff9ad768981ddb1 Mon Sep 17 00:00:00 2001 From: Aolin Date: Sat, 14 Sep 2024 11:45:50 +0800 Subject: [PATCH 030/127] Apply suggestions from code review --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 6c4a65841bcf..9c02c92f8729 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -97,7 +97,7 @@ TiDB 版本:8.4.0 * ‘tidb_scatter_region’ 支持设置集群级别的 region 打算策略 [#issue号](链接) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** - ‘tidb_scatter_region’ 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打算策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。因此,从 V8.3.0 版本开始,将该系统变量改为字符串类型,且新增支持集群级别的打算策略,避免上述场景下导致 TiKV OOM 的问题。 + ‘tidb_scatter_region’ 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打算策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。因此,从 V8.3.0 版本开始,将该系统变量改为字符串类型,且新增支持集群级别的打散策略,避免上述场景下导致 TiKV OOM 的问题。 更多信息,请参考[用户文档](链接)。 * 资源管控为后台任务设置资源上限 [#issue号](链接) @[glorv](https://github.com/glorv) **tw@hfxsd** From 25cf2bd1199e5de4c891d423c7332447e764a03a Mon Sep 17 00:00:00 2001 From: Aolin Date: Sat, 14 Sep 2024 11:46:40 +0800 Subject: [PATCH 031/127] Apply suggestions from code review --- releases/release-8.4.0.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 9c02c92f8729..f808d9c873fb 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -253,6 +253,9 @@ TiDB 版本:8.4.0 | [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值改为 `ON`。当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join | | [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)| 新增 | 这个变量控制是否开启 Instance Plan Cache 功能。 | | [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的目标内存大小,超过这个大小则触发清理。| +| tidb_scatter_region | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 region 只支持表级别打散,v8.3.0 开始改成字符串型,并新增支持集群级别的打算策略,避免快速批量建表时由于 region 分布不均匀导致 TiKV OOM 的问题 | +| tidb_shard_row_id_bits | 新增 | 原先 ‘shard_row_id_bits’ 需要在每个 Create Table 或 Alter Table 的 SQL 语句里声明,一旦需要同样配置的表数量较多,操作复杂,因此引入该变量,可在 Global 或 Session 级别设置该系统变量,提升易用性 | +| tidb_pre_split_regions | 新增 | 原先 ‘pre_split_regions’ 需要在每个 Create Table SQL 语句里声明,一旦需要同样配置的表数量较多,操作复杂,因此引入该变量,可在 Global 或 Session 级别设置该系统变量,提升易用性 | ### 配置文件参数 From 3ed62315309c42a04a87caf0a0182a4971de6cab Mon Sep 17 00:00:00 2001 From: Aolin Date: Sat, 14 Sep 2024 15:34:49 +0800 Subject: [PATCH 032/127] fix format Signed-off-by: Aolin --- releases/release-8.4.0.md | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index f808d9c873fb..879bd530c6f9 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -25,12 +25,6 @@ TiDB 版本:8.4.0 ### 性能 -* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - - 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) - - 更多信息,请参考[用户文档](链接)。 - * 增加获取 TSO 的 RPC 模式,降低获取 TSO 的延迟 [#54960](https://github.com/pingcap/tidb/issues/54960) @[MyonKeminta](https://github.com/MyonKeminta) **tw@qiancai** TiDB 在向 PD 请求 TSO 时,会将一段时间内的请求汇总起来并以同步的方式进行批处理,以减少 RPC (Remote Procedure Call) 请求数量从而降低 PD 负载。对于延迟敏感的场景,这种模式的性能并不理想。在 v8.4.0 中,TiDB 新增 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。你可以通过 [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) 变量设定获取 TSO 的 RPC 模式。 @@ -49,11 +43,13 @@ TiDB 版本:8.4.0 * `DATE_SUB()` 更多信息,请参考[用户文档](/functions-and-operators/expressions-pushed-down.md)。 + * 提升批量创建用户和修改用户密码操作的性能,提升达数百倍 [#55604](https://github.com/pingcap/tidb/pull/55604) @[wjhuang2016](https://github.com/wjhuang2016) **tw@xxx** 在 SaaS 场景下,存在批量创建大量用户,以及定期轮换所有用户密码的需求,且需要在指定时间窗口内完成,从 V8.3.0 开始,对批量创建用户,批量修改用户密码的性能做了提升,且用户可以通过增加 session 连接数来提升并发,提升性能,大大缩短了该场景下的执行时间。 更多信息,请参考[用户文档](链接)。 + * 实例中的会话共享执行计划缓存 (实验特性) [#issue号](链接) @[qw4990](https://github.com/qw4990) **tw@Oreoxmt** 相比会话级执行计划缓存,执行计划缓存在会话间共享有明显的优势: @@ -73,12 +69,6 @@ TiDB 版本:8.4.0 ### 稳定性 -* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - - 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) - - 更多信息,请参考[用户文档](链接)。 - * 超出预期的查询 (Runaway Queries) 新增 "处理行数" 和 RU 作为阈值 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** TiDB 在 v8.4.0 可以依据 "处理行数 (`PROCESSED_KEYS`)" 和 "Request Unit (`RU`)" 定义超出预期的查询。和"执行时间(`EXEC_ELAPSED`)"相比,新增阈值能够更准确的定义查询的资源消耗,避免整体性能下降时发生识别偏差。 @@ -116,12 +106,6 @@ TiDB 版本:8.4.0 ### 高可用 -* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - - 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) - - 更多信息,请参考[用户文档](链接)。 - * TiProxy 支持流量回放功能(实验特性) [#642](https://github.com/pingcap/tiproxy/issues/642) @[djshow832](https://github.com/djshow832) **tw@Oreoxmt** 从 TiProxy v1.3.0 版本开始,TiProxy 将支持流量捕获回放功能。该功能可以从 TiDB 生产集群中捕获所有的访问流量,并在测试集群中按照指定的速率进行回放,验证所有 SQL 的执行结果和性能表现。 @@ -138,12 +122,6 @@ TiDB 版本:8.4.0 ### SQL 功能 -* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - - 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) - - 更多信息,请参考[用户文档](链接)。 - * 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) **tw@qiancai** 向量搜索是一种基于数据语义的搜索方法,旨在提供更相关的搜索结果,是 AI 和大语言模型(LLM)的关键功能之一。通过使用向量索引,数据库能够加速向量搜索的性能,快速基于不同的距离函数查询相似向量,从而支持检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种应用场景。 @@ -154,11 +132,13 @@ TiDB 版本:8.4.0 值得注意的是,TiDB 的向量索引依赖于 TiFlash,因此,在使用向量索引之前,需要确保 TiDB 集群中已添加 TiFlash 节点。 更多信息,请参考[用户文档](/vector-search-overview.md)。 + * TiDB 外键约束检查功能成为正式功能(GA) [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@lilin90** TiDB 从 v6.6.0 版本开始,可通过变量 foreign_key_checks 做外键约束检查,但是其一直为实验特性。v8.3.0 对外键特性在更多场景做了覆盖测试,稳定性和性能方面也有一些提升,因此从 v8.3.0 开始外键功能成为正式功能(GA) 更多信息,请参考[用户文档](链接)。 + ### 数据库管理 * 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** @@ -169,12 +149,6 @@ TiDB 版本:8.4.0 ### 可观测性 -* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** - - 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) - - 更多信息,请参考[用户文档](链接)。 - * 持久化部分内存表的快照 (实验特性) [#issue号](链接) @[xhebox](https://github.com/xhebox) **tw@lilin90** TiDB 的内存表中会保存很多运行时状态信息,比如会话状态、锁状态、SQL 运行状态等,用户可以据此了解数据库运行情况,这些信息被大量用在故障诊断和性能调优的场景。实际使用中会遇到几个问题: @@ -299,12 +273,12 @@ TiDB 版本:8.4.0 - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** - 减少部分场景的 DELETE 操作从 TiKV 获取的列信息数量,降低 DELETE 操作的资源开销。[#issue号](链接) [winoros](https://github.com/winoros) **tw@Oreoxmt** - - 优化 Priority Queue 基于 Meta Cache V2 的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) [Rustin170506](https://github.com/Rustin170506) + - 优化 Priority Queue 基于 Meta Cache V2 的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) [Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** - ‘tidb_enable_fast_create_table’ 开启后,支持了批量快速创建外键表的场景。 [#issue号](链接) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** + TiKV - - 默认 Region 大小由 96 MB 提升到 256 MB,避免 Region 数量过多带来的额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) + - 默认 Region 大小由 96 MB 提升到 256 MB,避免 Region 数量过多带来的额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** + PD From 170637d55a5dd2598b2aab7c6dc6f023d1fa4296 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Sat, 14 Sep 2024 15:50:02 +0800 Subject: [PATCH 033/127] draft highlights --- releases/release-8.4.0.md | 78 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index f808d9c873fb..eaa3999d18b2 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -13,6 +13,84 @@ TiDB 版本:8.4.0 在 8.4.0 版本中,你可以获得以下关键特性: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
分类功能/增强描述
可扩展性和性能 执行计划缓存在实例内共享(实验特性) 实例级执行计划缓存支持在内存中缓存更多的执行计划,消除 SQL 编译时所消耗的时间,从而减少 SQL 的运行时间,提升 OLTP 系统的性能和吞吐。同时,也能更好的控制内存占用,提升数据库稳定性。
分区表全局索引成为正式功能全局索引可以有效提高检索非分区列的效率,并且消除了唯一键必须包含分区键的限制。该功能扩展了 TiDB 分区表的使用场景,避免了数据迁移过程中的一些应用修改工作。
TiDB 并行获取 TSO 在高并发场景下,并行获取 TSO 能够有效降低等待获取 TSO 的时间,提升集群的吞吐。
提升管理类 SQL 的执行效率 在一部分 SaaS 系统中,存在批量创建大量用户,以及定期轮换所有用户密码的需求。TiDB 提升了创建和修改数据库用户的性能,保证操作能在期望的时间窗口。
缓存表的查询性能提升 优化了缓存表的查询性能,提升幅度最高可达5.4倍。在需要对小表进行高速查询的场景下,整体性能得到提升。
稳定性与高可用 Runaway Queries 支持更多触发条件,并能够切换资源组Runaway Queries 为用户提供了有效的手段,降低突发的 SQL 性能问题对系统产生的影响。新版本中新增处理行数Request Unit 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。
支持为后台任务设置资源使用上限 为后台任务设置百分比上线,针对不同业务系统的需求控制后台任务的消耗,可以按需将后台任务的消耗限制在一个很低的水平,保证在线业务的服务质量。
TiProxy 流量捕捉和回放 在做集群升级、迁移、部署变化等重要变更之前,通过捕捉真实负载来验证目标集群的性能,确保变更的成功。
统计信息收集自适应并发度 自动统计信息收集会根据节点规模和硬件规格自动决定采集并发度,提升统计信息收集效率,减少手工调优,保证集群性能稳定。
SQL 外键成为正式功能支持 MySQL 兼容的外键约束,维护数据一致性,进一步提升了 TiDB 对 MySQL 的兼容能力。
向量搜索功能(实验特性)加速向量搜索的性能,适用于检索增强生成(RAG)、语义搜索、推荐系统等应用类型。把 TiDB 应用场景扩展到 AI 和 大语言模型(LLM)领域。
数据库管理和可观测性 持久化内存表到 Workload Repository(实验特性) 持久化内存表中的运行指标和状态信息,是观测性的重要增强,能极大提升过往问题诊断和追溯的效率,并为未来的自动化运维,提供了数据集支持。 围绕 Workload Repository 构建报告、诊断、推荐一体化的能力,会成为未来提升 TiDB 易用性的重要组成。
在内存表中显示 TiKV 和 TiDB 的 CPU 时间将 CPU 时间合入系统表中展示,与会话或 SQL 的其他指标并列,方便用户从多角度对高 CPU 消耗的操作进行观测,提升诊断效率。尤其适用于诊断实例 CPU 飙升或集群读写热点等场景。
支持对开启了 IMDSv2 服务的 TiKV 实例做备份IMDSv2 目前是 AWS EC2 的默认元数据服务。TiDB 支持从开启了 IMDSv2 的 TiKV 实例中备份数据,协助客户更好地在公有云服务中运行 TiDB 集群。
安全 备份数据加密成为正式功能 加密数据库备份是一种增强数据安全性的重要措施,既可以保护数据备份中敏感信息,又有助于合规,确保数据在存储和传输中的安全。
+ ## 功能详情 ### 可扩展性 From 5311f145c86b00220e7ff2e32a239ef997c97c13 Mon Sep 17 00:00:00 2001 From: Aolin Date: Sat, 14 Sep 2024 15:55:21 +0800 Subject: [PATCH 034/127] add release notes for BR eliminate unnecessary write privileges to external storage Co-authored-by: Jianjun Liao <36503113+Leavrth@users.noreply.github.com> --- releases/release-8.4.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index ffacf51e56a8..686e3e5991fd 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -368,9 +368,10 @@ TiDB 版本:8.4.0 + Backup & Restore (BR) - - 集群恢复时同时设置 `split-table=false` 和 `split-region-on-table=false`,优化 region 的分配策略 [#issue号](链接) @[Leavrth](https://github.com/Leavrth) + - 集群恢复时同时设置 `split-table=false` 和 `split-region-on-table=false`,优化 region 的分配策略 [#53532](https://github.com/pingcap/tidb/issues/53532) @[Leavrth](https://github.com/Leavrth) **tw@qiancai** - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + - 快照恢复和日志恢复产生的断点数据将存储在恢复集群的临时库表中,日志恢复产生的上下游 ID 映射存储到系统表 `mysql.tidb_pitr_id_map` 中 [#55870](https://github.com/pingcap/tidb/issues/55870) @[Leavrth](https://github.com/Leavrth) **tw@Oreoxmt** + TiCDC From 549c901ab061e1d38e4370ef2b24ce3acb66782e Mon Sep 17 00:00:00 2001 From: Aolin Date: Sat, 14 Sep 2024 17:15:40 +0800 Subject: [PATCH 035/127] add comments for highlights Signed-off-by: Aolin --- releases/release-8.4.0.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 686e3e5991fd..9f4915d527a4 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -13,7 +13,6 @@ TiDB 版本:8.4.0 在 8.4.0 版本中,你可以获得以下关键特性: - @@ -25,67 +24,67 @@ TiDB 版本:8.4.0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -122,7 +121,7 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/functions-and-operators/expressions-pushed-down.md)。 -* 提升批量创建用户和修改用户密码操作的性能,提升达数百倍 [#55604](https://github.com/pingcap/tidb/pull/55604) @[wjhuang2016](https://github.com/wjhuang2016) **tw@xxx** +* 提升批量创建用户和修改用户密码操作的性能,提升达数百倍 [#55604](https://github.com/pingcap/tidb/pull/55604) @[wjhuang2016](https://github.com/wjhuang2016) **tw@hfxsd** 在 SaaS 场景下,存在批量创建大量用户,以及定期轮换所有用户密码的需求,且需要在指定时间窗口内完成,从 V8.3.0 开始,对批量创建用户,批量修改用户密码的性能做了提升,且用户可以通过增加 session 连接数来提升并发,提升性能,大大缩短了该场景下的执行时间。 @@ -168,6 +167,7 @@ TiDB 版本:8.4.0 ‘tidb_scatter_region’ 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打算策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。因此,从 V8.3.0 版本开始,将该系统变量改为字符串类型,且新增支持集群级别的打散策略,避免上述场景下导致 TiKV OOM 的问题。 更多信息,请参考[用户文档](链接)。 + * 资源管控为后台任务设置资源上限 [#issue号](链接) @[glorv](https://github.com/glorv) **tw@hfxsd** TiDB 资源管控能够识别并降低后台任务的运行优先级。在部分场景下,即使有空闲资源,客户希望后台任务消耗能够控制在很低的水平。在新版本中,资源管控可以通过 `UTILIZATION_LIMIT` 指令为后台任务设置资源百分比,每个节点把所有后台任务的使用量控制在这个百分比以下。精细控制后台任务的资源占用,进一步提升集群稳定性。 From b1fd95adc92f0ac58013171ea06077dfa4600c59 Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Sat, 14 Sep 2024 18:27:33 +0800 Subject: [PATCH 036/127] Update release-8.4.0.md --- releases/release-8.4.0.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 9f4915d527a4..69ea7e39b6f6 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -110,9 +110,9 @@ TiDB 版本:8.4.0 * 优化 TiDB 的 Hash Join 算子实现效率(实验特性) [#55153](https://github.com/pingcap/tidb/issues/55153) [#53127](https://github.com/pingcap/tidb/issues/53127) @[windtalker](https://github.com/windtalker) @[xzhangxian1008](https://github.com/xzhangxian1008) @[XuHuaiyu](https://github.com/XuHuaiyu) @[wshwsh12](https://github.com/wshwsh12) **tw@qiancai** - 在 v8.4.0 版本之前,TiDB 的 Hash Join 算子实现效率不高。从 v8.4.0 开始,TiDB 将对 Hash Join 算子进行重构优化,提升执行效率。在 v8.4.0 版本,该功能为实验特性,只有 INNER JOIN 和 OUTER JOIN 可以使用重构后的高性能 Hash Join 算子。当该功能启用时,执行器会根据高性能 Hash Join 算子对关联操作的支持情况,自动选择是否使用高性能 Hash Join 算子。你可以通过 [tidb_hash_join_use_new_impl](/system-variables.md#tidb_hash_join_use_new_impl-从-v840-版本开始引入) 变量控制是否启用高性能 Hash Join 算子。 + 在 v8.4.0 版本之前,TiDB 的 Hash Join 算子实现效率不高。从 v8.4.0 开始,TiDB 将对 Hash Join 算子进行重构优化,提升执行效率。在 v8.4.0 版本,该功能为实验特性,只有 INNER JOIN 和 OUTER JOIN 可以使用重构后的高性能 Hash Join 算子。当该功能启用时,执行器会根据高性能 Hash Join 算子对关联操作的支持情况,自动选择是否使用高性能 Hash Join 算子。你可以通过 [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) 变量控制是否启用高性能 Hash Join 算子。 - 更多信息,请参考[用户文档](/system-variables.md#tidb_hash_join_use_new_impl-从-v840-版本开始引入)。 + 更多信息,请参考[用户文档](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入)。 * 支持下推以下字符串函数到 TiKV [#17529](https://github.com/tikv/tikv/issues/17529) @[gengliqi](https://github.com/gengliqi) **tw@qiancai** @@ -308,6 +308,8 @@ TiDB 版本:8.4.0 | tidb_scatter_region | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 region 只支持表级别打散,v8.3.0 开始改成字符串型,并新增支持集群级别的打算策略,避免快速批量建表时由于 region 分布不均匀导致 TiKV OOM 的问题 | | tidb_shard_row_id_bits | 新增 | 原先 ‘shard_row_id_bits’ 需要在每个 Create Table 或 Alter Table 的 SQL 语句里声明,一旦需要同样配置的表数量较多,操作复杂,因此引入该变量,可在 Global 或 Session 级别设置该系统变量,提升易用性 | | tidb_pre_split_regions | 新增 | 原先 ‘pre_split_regions’ 需要在每个 Create Table SQL 语句里声明,一旦需要同样配置的表数量较多,操作复杂,因此引入该变量,可在 Global 或 Session 级别设置该系统变量,提升易用性 | +| [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | +| [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 原有的 TiDB Hash Join 算法效率不佳,引入新的 HashJoin 版本,实现更加高效的计算 | ### 配置文件参数 @@ -315,8 +317,8 @@ TiDB 版本:8.4.0 | 配置文件 | 配置项 | 修改类型 | 描述 | | -------- | -------- | -------- | -------- | | TiKV | grpc-keepalive-timeout | 修改 | 该配置文件参数原先为 int 类型,且最小值仅支持设置为 1,从 v8.3.0 开始,数据类型修改为 float64 ,且最小值支持设置为 0.05,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | -| | | | | -| | | | | +| TiKV | in_memory_peer_size_limit | 新增 | 该配置文件参数用于指定单 region 的 内存上限 | +| TiKV | in_memory_global_size_limit | 新增 | 该配置文件参数用于指定 TiKV 实例的 内存上限 | | | | | | ### 系统表 @@ -358,6 +360,9 @@ TiDB 版本:8.4.0 - 默认 Region 大小由 96 MB 提升到 256 MB,避免 Region 数量过多带来的额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** + - 增加配置项指定单 region 和实例的内存用量,在热点写时通过增加内存避免落盘带来的额外 CPU/IO 消耗 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@qiancai** + + + PD - `Lightning` 导入过程中,允许 PD 做 `evict-leader` 调度来避免阻断 TiKV 的 offline 进程 [#issue号](链接) @[okJiang](https://github.com/okJiang) **tw@qiancai** From b18d6c4509df94bad13c3d33e1f107f91dd0c90a Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Sat, 14 Sep 2024 20:38:49 +0800 Subject: [PATCH 037/127] Update release-8.4.0.md --- releases/release-8.4.0.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 69ea7e39b6f6..2e497acfc5cb 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -317,8 +317,8 @@ TiDB 版本:8.4.0 | 配置文件 | 配置项 | 修改类型 | 描述 | | -------- | -------- | -------- | -------- | | TiKV | grpc-keepalive-timeout | 修改 | 该配置文件参数原先为 int 类型,且最小值仅支持设置为 1,从 v8.3.0 开始,数据类型修改为 float64 ,且最小值支持设置为 0.05,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | -| TiKV | in_memory_peer_size_limit | 新增 | 该配置文件参数用于指定单 region 的 内存上限 | -| TiKV | in_memory_global_size_limit | 新增 | 该配置文件参数用于指定 TiKV 实例的 内存上限 | +| TiKV | in_memory_peer_size_limit | 新增 | 该配置文件参数用于指定单 region 的内存悲观锁的内存上限 | +| TiKV | in_memory_global_size_limit | 新增 | 该配置文件参数用于指定 TiKV 实例的内存悲观锁的内存上限 | | | | | | ### 系统表 @@ -359,8 +359,7 @@ TiDB 版本:8.4.0 + TiKV - 默认 Region 大小由 96 MB 提升到 256 MB,避免 Region 数量过多带来的额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - - - 增加配置项指定单 region 和实例的内存用量,在热点写时通过增加内存避免落盘带来的额外 CPU/IO 消耗 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@qiancai** + - 增加配置项指定单 region 和 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多情况,可修改配置提升内存上限避免悲观锁落盘相关 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@qiancai** + PD From 4ff702459afef6374e1ee5676f013c2cd432e3f2 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Sun, 15 Sep 2024 12:00:48 +0800 Subject: [PATCH 038/127] rephrase highlights. --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 2e497acfc5cb..108457d073c2 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -41,7 +41,7 @@ TiDB 版本:8.4.0 - + From 776b306cb1725e6757414afdf28529d04d0fe007 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 18 Sep 2024 15:35:35 +0800 Subject: [PATCH 039/127] add Global Index GA, cached table optimization, GB18030, client-side log backup encryption. Remove table creation acceleration for foreign keys Co-authored-by: Frank945946 <108602632+Frank945946@users.noreply.github.com> Co-authored-by: Wenqi Mou --- releases/release-8.4.0.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 108457d073c2..969107b37a9e 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -143,7 +143,20 @@ TiDB 版本:8.4.0 通过开启配置 [`logical-import-prep-stmt`](),`Lightning` 逻辑导入产生的 SQL 语句将会通过 prepare 接口执行,提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 更多信息,请参考[用户文档]() +* 分区表的全局索引成为正式功能(GA) [#45133](https://github.com/pingcap/tidb/issues/45133) @[mjonss](https://github.com/mjonss)@[Defined2014](https://github.com/Defined2014) **tw@hfxsd** +# + 之前版本的分区表,因为不支持全局索引有较多的限制,比如唯一键必须包含分区表达式中用到的所有列,如果查询条件不带分区键,查询时会扫描所有分区,导致性能较差。从 v7.6.0 开始,引入了系统变量 [tidb_enable_global_index](https://docs.pingcap.com/zh/tidb/dev/system-variables#tidb_enable_global_index-%E4%BB%8E-v760-%E7%89%88%E6%9C%AC%E5%BC%80%E5%A7%8B%E5%BC%95%E5%85%A5) 用于开启全局索引特性,但该功能当时处于开发中,不够完善,不建议开启。 +从 v8.4.0 开始,全局索引作为正式功能发布(GA)。你可通过关键字 Global 为分区表显式创建一个全局索引,从而去除分区表唯一键必须包含分区表达式中用到的所有列的限制,满足灵活的业务需求。同时基于全局索引也提升了非分区列的查询性能。 + + 更多信息,请参考[用户文档](链接)。 + +* 优化了缓存表在部分场景下的查询性能 [#issue号](链接) @[tiancaiamao](https://github.com/tiancaiamao) **tw@hfxsd** + +优化了缓存表的查询性能,在使用 index lookup 执行 SELECT ... LIMIT 1 时,性能最高提升 5.4 倍。同时,提升了 indexLookupReader 在全表扫描和主键查询场景下的性能。 + + **更多信息,请参考[用户文档](链接)。** + ### 稳定性 * 超出预期的查询 (Runaway Queries) 新增 "处理行数" 和 RU 作为阈值 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** @@ -215,6 +228,15 @@ TiDB 版本:8.4.0 TiDB 从 v6.6.0 版本开始,可通过变量 foreign_key_checks 做外键约束检查,但是其一直为实验特性。v8.3.0 对外键特性在更多场景做了覆盖测试,稳定性和性能方面也有一些提升,因此从 v8.3.0 开始外键功能成为正式功能(GA) + 更多信息,请参考[用户文档](链接)。 +* 支持字符集 GB18030 和排序规则 gb18030_bin 和 gb18030_general_ci [#issue号](链接) @[cbcwestwolf](https://github.com/cbcwestwolf) **tw@hfxsd** + +新增字符集支持:TiDB v8.4 新增了对 GB18030 字符集的支持,这是一个广泛用于中文字符编码的标准,确保 TiDB 能够更好地处理中文相关的数据存储和查询需求。 + +新增排序规则:引入了 gb18030_bin 和 gb18030_general_ci 两种排序规则。gb18030_bin 提供了基于二进制的精准排序,而 gb18030_general_ci 则支持大小写不敏感的通用排序规则。这两种排序规则使得对 GB18030 编码文本的排序和比较更加灵活高效。 + +通过支持 GB18030 字符集及其排序规则,TiDB v8.4 增强了与中文应用场景的兼容性,特别是在涉及多种语言和字符编码的场景下,用户能够更方便地进行字符集的选择和操作,提升了数据库的使用体验。 + 更多信息,请参考[用户文档](链接)。 ### 数据库管理 @@ -355,7 +377,6 @@ TiDB 版本:8.4.0 - 减少部分场景的 DELETE 操作从 TiKV 获取的列信息数量,降低 DELETE 操作的资源开销。[#issue号](链接) [winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化 Priority Queue 基于 Meta Cache V2 的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) [Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** - - ‘tidb_enable_fast_create_table’ 开启后,支持了批量快速创建外键表的场景。 [#issue号](链接) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** + TiKV - 默认 Region 大小由 96 MB 提升到 256 MB,避免 Region 数量过多带来的额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** @@ -376,7 +397,7 @@ TiDB 版本:8.4.0 **tw@qiancai** - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** - 快照恢复和日志恢复产生的断点数据将存储在恢复集群的临时库表中,日志恢复产生的上下游 ID 映射存储到系统表 `mysql.tidb_pitr_id_map` 中 [#55870](https://github.com/pingcap/tidb/issues/55870) @[Leavrth](https://github.com/Leavrth) **tw@Oreoxmt** - + - 日志备份与恢复现在支持本地加密,包括直接使用密钥,基于本地磁盘的主密钥和基于KMS的主密钥的加密方式。[55834](https://github.com/pingcap/tidb/issues/55834) @[Tristan1900](https://github.com/Tristan1900) **tw@qiancai** + TiCDC + TiDB Data Migration (DM) From 37de4003b4de5b9cd39b0521e3ee0a147ee318d9 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 18 Sep 2024 15:46:59 +0800 Subject: [PATCH 040/127] update client-side log backup, BR reduces requires storage permissions for restores, BR Supports AWS IMDSv2 Signed-off-by: Aolin --- releases/release-8.4.0.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 969107b37a9e..2c263c661d30 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -241,11 +241,17 @@ TiDB 版本:8.4.0 ### 数据库管理 -* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** +* PITR adds client-side log backup data encryption support (experimental) [#55834](https://github.com/pingcap/tidb/issues/55834) @[Tristan1900](https://github.com/Tristan1900) **tw@qiancai** - 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + Previously only the data from a snapshot based backup could be encrypted (on the client side) with a data key provided by the user. With this feature, log backups may now also be encrypted, ensuring that the confidentiality of information within the backup data is secured. - 更多信息,请参考[用户文档](链接)。 + For more information, see [documentation](doc-link). + +* BR reduces requires storage permissions for restores [#55870](https://github.com/pingcap/tidb/issues/55870) @[Leavrth](https://github.com/Leavrth) **tw@Oreoxmt** + + Previously, when BR was restoring data, checkpoint information about the progress of the restore was recorded in the location hosting the backup data. These restore checkpoints enabled restoration to be quickly resumed if it was interrupted. With this feature, the restore checkpoints are now stored in the target TiDB cluster. This means that BR only requires read access to the backup dataset location for restores. + + For more information, see [documentation](doc-link). ### 可观测性 @@ -296,11 +302,11 @@ TiDB 版本:8.4.0 ### 安全 -* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** +* TiDB BR Supports AWS IMDSv2 [#16443](https://github.com/tikv/tikv/issues/16443) @[pingyu](https://github.com/pingyu) **tw@hfxsd** - 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + TiDB BR now supports AWS's Instance Metadata Service Version 2 (IMDSv2) when deployed on AWS EC2. This enables users to configure the newer session-oriented method on their EC2 instances, and for BR to be able to successfully use the IAM Role associated with the instance to access AWS S3 with the appropriate privileges. - 更多信息,请参考[用户文档](链接)。 + For more information, see [documentation](/backup-and-restore-storages#authentication). ### 数据迁移 @@ -396,8 +402,7 @@ TiDB 版本:8.4.0 - 集群恢复时同时设置 `split-table=false` 和 `split-region-on-table=false`,优化 region 的分配策略 [#53532](https://github.com/pingcap/tidb/issues/53532) @[Leavrth](https://github.com/Leavrth) **tw@qiancai** - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** - - 快照恢复和日志恢复产生的断点数据将存储在恢复集群的临时库表中,日志恢复产生的上下游 ID 映射存储到系统表 `mysql.tidb_pitr_id_map` 中 [#55870](https://github.com/pingcap/tidb/issues/55870) @[Leavrth](https://github.com/Leavrth) **tw@Oreoxmt** - - 日志备份与恢复现在支持本地加密,包括直接使用密钥,基于本地磁盘的主密钥和基于KMS的主密钥的加密方式。[55834](https://github.com/pingcap/tidb/issues/55834) @[Tristan1900](https://github.com/Tristan1900) **tw@qiancai** + + TiCDC + TiDB Data Migration (DM) From d16176bbda723278b35a4da63a186000a91a1c8e Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 18 Sep 2024 15:52:07 +0800 Subject: [PATCH 041/127] Apply suggestions from code review --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 2c263c661d30..23e54df62173 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -229,7 +229,7 @@ TiDB 版本:8.4.0 TiDB 从 v6.6.0 版本开始,可通过变量 foreign_key_checks 做外键约束检查,但是其一直为实验特性。v8.3.0 对外键特性在更多场景做了覆盖测试,稳定性和性能方面也有一些提升,因此从 v8.3.0 开始外键功能成为正式功能(GA) 更多信息,请参考[用户文档](链接)。 -* 支持字符集 GB18030 和排序规则 gb18030_bin 和 gb18030_general_ci [#issue号](链接) @[cbcwestwolf](https://github.com/cbcwestwolf) **tw@hfxsd** +* 支持字符集 GB18030 和排序规则 gb18030_bin 和 gb18030_general_ci [#issue号](链接) @[cbcwestwolf](https://github.com/cbcwestwolf) **tw@lilin90** 新增字符集支持:TiDB v8.4 新增了对 GB18030 字符集的支持,这是一个广泛用于中文字符编码的标准,确保 TiDB 能够更好地处理中文相关的数据存储和查询需求。 From 6546c877deefa07166dded3952854f90da363060 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 19 Sep 2024 15:25:39 +0800 Subject: [PATCH 042/127] Apply suggestions from code review --- releases/release-8.4.0.md | 50 +++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 23e54df62173..c8cec49ab11d 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -143,19 +143,18 @@ TiDB 版本:8.4.0 通过开启配置 [`logical-import-prep-stmt`](),`Lightning` 逻辑导入产生的 SQL 语句将会通过 prepare 接口执行,提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 更多信息,请参考[用户文档]() -* 分区表的全局索引成为正式功能(GA) [#45133](https://github.com/pingcap/tidb/issues/45133) @[mjonss](https://github.com/mjonss)@[Defined2014](https://github.com/Defined2014) **tw@hfxsd** + +* 分区表的全局索引成为正式功能 (GA) [#45133](https://github.com/pingcap/tidb/issues/45133) @[mjonss](https://github.com/mjonss)@[Defined2014](https://github.com/Defined2014) **tw@hfxsd** # - 之前版本的分区表,因为不支持全局索引有较多的限制,比如唯一键必须包含分区表达式中用到的所有列,如果查询条件不带分区键,查询时会扫描所有分区,导致性能较差。从 v7.6.0 开始,引入了系统变量 [tidb_enable_global_index](https://docs.pingcap.com/zh/tidb/dev/system-variables#tidb_enable_global_index-%E4%BB%8E-v760-%E7%89%88%E6%9C%AC%E5%BC%80%E5%A7%8B%E5%BC%95%E5%85%A5) 用于开启全局索引特性,但该功能当时处于开发中,不够完善,不建议开启。 + 之前版本的分区表,因为不支持全局索引有较多的限制,比如唯一键必须包含分区表达式中用到的所有列,如果查询条件不带分区键,查询时会扫描所有分区,导致性能较差。从 v7.6.0 开始,引入了系统变量 [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) 用于开启全局索引特性,但该功能当时处于开发中,不够完善,不建议开启。 -从 v8.4.0 开始,全局索引作为正式功能发布(GA)。你可通过关键字 Global 为分区表显式创建一个全局索引,从而去除分区表唯一键必须包含分区表达式中用到的所有列的限制,满足灵活的业务需求。同时基于全局索引也提升了非分区列的查询性能。 + 从 v8.4.0 开始,全局索引作为正式功能发布 (GA)。你可通过关键字 `GLOBAL` 为分区表显式创建一个全局索引,从而去除分区表唯一键必须包含分区表达式中用到的所有列的限制,满足灵活的业务需求。同时基于全局索引也提升了非分区列的查询性能。 - 更多信息,请参考[用户文档](链接)。 + 更多信息,请参考[用户文档](/partitioned-table.md#全局索引)。 -* 优化了缓存表在部分场景下的查询性能 [#issue号](链接) @[tiancaiamao](https://github.com/tiancaiamao) **tw@hfxsd** - -优化了缓存表的查询性能,在使用 index lookup 执行 SELECT ... LIMIT 1 时,性能最高提升 5.4 倍。同时,提升了 indexLookupReader 在全表扫描和主键查询场景下的性能。 +* 优化了缓存表在部分场景下的查询性能 [#43249](https://github.com/pingcap/tidb/issues/43249) @[tiancaiamao](https://github.com/tiancaiamao) **tw@hfxsd** - **更多信息,请参考[用户文档](链接)。** + 优化了缓存表的查询性能,在使用 `IndexLookup` 执行 `SELECT ... LIMIT 1` 时,性能最高提升 5.4 倍。同时,提升了 `IndexLookupReader` 在全表扫描和主键查询场景下的性能。 ### 稳定性 @@ -169,25 +168,27 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/tidb-resource-control.md#管理资源消耗超出预期的查询-runaway-queries)。 -* 超出预期的查询 (Runaway Queries) 支持切换资源组 [#issue号](链接) @[JmPotato](https://github.com/JmPotato) **tw@hfxsd** +* 超出预期的查询 (Runaway Queries) 支持切换资源组 [#54434](https://github.com/pingcap/tidb/issues/54434) @[JmPotato](https://github.com/JmPotato) **tw@hfxsd** - v8.4.0 新增支持将 `Runaway Queries` 切换到指定资源组。在降低优先级 (COOLDOWN) 仍旧无法有效降低资源消耗的情况下,用户可以创建一个资源组 [`RESOURCE GROUP`](/tidb-resource-control.md#管理资源组),并指定将识别到的查询切换到该资源组中,会话的后续查询仍旧会遵循原资源组。切换资源组的行为能够更精确地限制资源使用,对 `Runaway Queries` 的资源消耗做更加严格的控制。 + v8.4.0 新增支持将 `Runaway Queries` 切换到指定资源组。在降低优先级 (COOLDOWN) 仍旧无法有效降低资源消耗的情况下,你可以创建一个[资源组 (Resource Group)](/tidb-resource-control.md#管理资源组),并通过配置参数 `SWITCH_GROUP` 指定将识别到的查询切换到该资源组中,会话的后续查询仍在原资源组中执行。切换资源组的行为能够更精确地限制资源使用,对 `Runaway Queries` 的资源消耗做更加严格的控制。 - 更多信息,请参考[用户文档](/tidb-resource-control.md#管理资源消耗超出预期的查询-runaway-queries)。 + 更多信息,请参考[用户文档](/tidb-resource-control.md#query_limit-参数说明)。 -* ‘tidb_scatter_region’ 支持设置集群级别的 region 打算策略 [#issue号](链接) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** +* 系统变量 `tidb_scatter_region` 支持设置集群级别的 Region 打算策略 [#issue号](链接) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** - ‘tidb_scatter_region’ 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打算策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。因此,从 V8.3.0 版本开始,将该系统变量改为字符串类型,且新增支持集群级别的打散策略,避免上述场景下导致 TiKV OOM 的问题。 + 系统变了 `tidb_scatter_region` 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打算策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。 + + 为解决上述问题,从 v8.4.0 版本开始,将该系统变量改为字符串类型,且新增支持集群级别的打散策略,避免上述场景下导致 TiKV OOM 的问题。 - 更多信息,请参考[用户文档](链接)。 + 更多信息,请参考[用户文档](/system-variables.md#tidb_scatter_region-从-v840-版本开始引入)。 -* 资源管控为后台任务设置资源上限 [#issue号](链接) @[glorv](https://github.com/glorv) **tw@hfxsd** +* 资源管控为后台任务设置资源上限 [#56019](https://github.com/pingcap/tidb/issues/56019) @[glorv](https://github.com/glorv) **tw@hfxsd** - TiDB 资源管控能够识别并降低后台任务的运行优先级。在部分场景下,即使有空闲资源,客户希望后台任务消耗能够控制在很低的水平。在新版本中,资源管控可以通过 `UTILIZATION_LIMIT` 指令为后台任务设置资源百分比,每个节点把所有后台任务的使用量控制在这个百分比以下。精细控制后台任务的资源占用,进一步提升集群稳定性。 + TiDB 资源管控能够识别并降低后台任务的运行优先级。在部分场景下,即使有空闲资源,用户也希望后台任务消耗能够控制在很低的水平。从 v8.4.0 开始,你可以通过 `UTILIZATION_LIMIT` 指令为资源管控的后台任务设置资源百分比,每个节点把所有后台任务的使用量控制在这个百分比以下。该功能可以让你精细控制后台任务的资源占用,进一步提升集群稳定性。 更多信息,请参考[用户文档](/tidb-resource-control.md#管理后台任务)。 -* 优化资源组资源分配策略 [#issue号](链接) @[nolouch](https://github.com/nolouch) **tw@hfxsd** +* 优化资源组资源分配策略 [#issue号](链接) @[nolouch](https://github.com/nolouch) **tw@lilin90** TiDB 在 v8.4.0 部分调整了资源分配策略,更好的满足客户对资源管控的预期。 @@ -286,13 +287,15 @@ TiDB 版本:8.4.0 * 在系统表中显示 TiDB 和 TiKV 的 CPU 时间 [#55542](https://github.com/pingcap/tidb/issues/55542) @[yibin87](https://github.com/yibin87) **tw@hfxsd** - [TiDB Dashboard](/dashboard/dashboard-intro.md) 的 [TOP SQL 页面](/dashboard/top-sql.md)能够展示 CPU 消耗高的 SQL 语句。v8.4.0 开始,TiDB 将 CPU 时间消耗信息加入系统表展示,与会话或 SQL 的其他指标并列,方便客户从多角度对高 CPU 消耗的操作进行观测。在实例 CPU 飙升 或集群读写热点的场景下,这些信息能够协助客户快速发现问题的原因。 + [TiDB Dashboard](/dashboard/dashboard-intro.md) 的 [TOP SQL 页面](/dashboard/top-sql.md)能够展示 CPU 消耗高的 SQL 语句。从 v8.4.0 开始,TiDB 将 CPU 时间消耗信息加入系统表展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测。在实例 CPU 飙升或集群读写热点的场景下,这些信息能够协助你快速发现问题的原因。 - - [`STATEMENTS_SUMMARY`](/statement-summary-tables.md) 增加 `AVG_TIDB_CPU_TIME` 和 `AVG_TIKV_CPU_TIME`,显示单个 SQL 语句在历史上消耗的平均 CPU 时间。 + - [`STATEMENTS_SUMMARY`](/statement-summary-tables.md) 增加 `AVG_TIDB_CPU_TIME` 和 `AVG_TIKV_CPU_TIME`,显示单个 SQL 语句在历史上消耗的平均 CPU 的时间。 - [`INFORMATION_SCHEMA.PROCESSLIST`](/information-schema/information-schema-processlist.md) 增加 `TIDB_CPU` 和 `TIKV_CPU`,显示会话当前正在执行 SQL 的累计 CPU 消耗。 - - [慢日志](/analyze-slow-queries.md)中增加字段 `Tidb_cpu_time` 和 `Tikv_cpu_time`,显示被捕捉到的 SQL 语句的 CPU 时间。 + - [慢日志](/analyze-slow-queries.md)中增加字段 `Tidb_cpu_time` 和 `Tikv_cpu_time`,显示被捕捉到的 SQL 语句的 CPU 的时间。 - 其中,TiKV 的 CPU 时间默认显示;采集 TiDB 的 CPU 时间会引入额外开销(大概在8%),因此仅在开启 [Top SQL 特性](/dashboard/top-sql.md)时,TiDB 的 CPU 时间才会显示为实际值,否则始终显示为 `0`。 + 其中,TiKV 的 CPU 时间默认显示。采集 TiDB 的 CPU 时间会引入额外开销(约 8%),因此仅在开启 [Top SQL 特性](/dashboard/top-sql.md)时,TiDB 的 CPU 时间才会显示为实际值,否则始终显示为 `0`。 + + 更多信息,请参考[用户文档](/information-schema/information-schema-processlist.md)和[用户文档](information-schema/information-schema-slow-query.md)。 * TOP SQL 可按 `Schema` 或 `Table` 维度聚合 [#issue号](链接) @[nolouch](https://github.com/nolouch) **tw@lilin90** @@ -302,11 +305,12 @@ TiDB 版本:8.4.0 ### 安全 -* TiDB BR Supports AWS IMDSv2 [#16443](https://github.com/tikv/tikv/issues/16443) @[pingyu](https://github.com/pingyu) **tw@hfxsd** +* BR 支持 AWS IMDSv2 [#16443](https://github.com/tikv/tikv/issues/16443) @[pingyu](https://github.com/pingyu) **tw@hfxsd** TiDB BR now supports AWS's Instance Metadata Service Version 2 (IMDSv2) when deployed on AWS EC2. This enables users to configure the newer session-oriented method on their EC2 instances, and for BR to be able to successfully use the IAM Role associated with the instance to access AWS S3 with the appropriate privileges. + 在 AWS EC2 上部署时,TiDB BR 支持 AWS 的 Instance Metadata Service Version 2 (IMDSv2)。你可以在 EC2 实例上配置较新的面向会话的方法,BR 也可以使用与实例关联的 IAM 角色以适当的权限访问 AWS S3。 - For more information, see [documentation](/backup-and-restore-storages#authentication). + 更多信息,请参考[用户文档](/backup-and-restore-storages#authentication)。 ### 数据迁移 From 23afa5b73856b435305045d4f5a3b73794826aab Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 19 Sep 2024 16:11:10 +0800 Subject: [PATCH 043/127] Update releases/release-8.4.0.md --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index c8cec49ab11d..cdf514188183 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -174,7 +174,7 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/tidb-resource-control.md#query_limit-参数说明)。 -* 系统变量 `tidb_scatter_region` 支持设置集群级别的 Region 打算策略 [#issue号](链接) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** +* 系统变量 `tidb_scatter_region` 支持设置集群级别的 Region 打算策略 [#55184](https://github.com/pingcap/tidb/issues/55184) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** 系统变了 `tidb_scatter_region` 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打算策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。 From 73a0a7f3828dfaf238ef64d86cd577c6c23a8188 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Fri, 20 Sep 2024 15:05:48 +0800 Subject: [PATCH 044/127] Apply suggestions from code review --- releases/release-8.4.0.md | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index cdf514188183..afe4632890c1 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -123,9 +123,7 @@ TiDB 版本:8.4.0 * 提升批量创建用户和修改用户密码操作的性能,提升达数百倍 [#55604](https://github.com/pingcap/tidb/pull/55604) @[wjhuang2016](https://github.com/wjhuang2016) **tw@hfxsd** - 在 SaaS 场景下,存在批量创建大量用户,以及定期轮换所有用户密码的需求,且需要在指定时间窗口内完成,从 V8.3.0 开始,对批量创建用户,批量修改用户密码的性能做了提升,且用户可以通过增加 session 连接数来提升并发,提升性能,大大缩短了该场景下的执行时间。 - - 更多信息,请参考[用户文档](链接)。 + 在 SaaS 场景下,你可能需要在指定时间内批量创建大量用户、以及定期轮换所有用户密码。从 v8.4.0 开始,提升了批量创建用户、批量修改用户密码的性能,而且你可以通过增加会话连接数来提升并发,提升性能,从而大幅缩短该场景下的执行时间。 * 实例中的会话共享执行计划缓存 (实验特性) [#issue号](链接) @[qw4990](https://github.com/qw4990) **tw@Oreoxmt** @@ -148,7 +146,9 @@ TiDB 版本:8.4.0 # 之前版本的分区表,因为不支持全局索引有较多的限制,比如唯一键必须包含分区表达式中用到的所有列,如果查询条件不带分区键,查询时会扫描所有分区,导致性能较差。从 v7.6.0 开始,引入了系统变量 [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) 用于开启全局索引特性,但该功能当时处于开发中,不够完善,不建议开启。 - 从 v8.4.0 开始,全局索引作为正式功能发布 (GA)。你可通过关键字 `GLOBAL` 为分区表显式创建一个全局索引,从而去除分区表唯一键必须包含分区表达式中用到的所有列的限制,满足灵活的业务需求。同时基于全局索引也提升了非分区列的查询性能。 + 从 v8.3.0 开始,全局索引作为实验特性正式发布。你可通过关键字 `GLOBAL` 为分区表显式创建一个全局索引,从而去除分区表唯一键必须包含分区表达式中用到的所有列的限制,满足灵活的业务需求。同时基于全局索引也提升了非分区列的查询性能。 + + 在 v8.4.0 中,全局索引成为正式功能 (GA)。 更多信息,请参考[用户文档](/partitioned-table.md#全局索引)。 @@ -170,21 +170,21 @@ TiDB 版本:8.4.0 * 超出预期的查询 (Runaway Queries) 支持切换资源组 [#54434](https://github.com/pingcap/tidb/issues/54434) @[JmPotato](https://github.com/JmPotato) **tw@hfxsd** - v8.4.0 新增支持将 `Runaway Queries` 切换到指定资源组。在降低优先级 (COOLDOWN) 仍旧无法有效降低资源消耗的情况下,你可以创建一个[资源组 (Resource Group)](/tidb-resource-control.md#管理资源组),并通过配置参数 `SWITCH_GROUP` 指定将识别到的查询切换到该资源组中,会话的后续查询仍在原资源组中执行。切换资源组的行为能够更精确地限制资源使用,对 `Runaway Queries` 的资源消耗做更加严格的控制。 + v8.4.0 新增支持将 Runaway Queries 切换到指定资源组。在降低优先级 (COOLDOWN) 仍旧无法有效降低资源消耗的情况下,你可以创建一个[资源组 (Resource Group)](/tidb-resource-control.md#创建资源组),并通过配置参数 `SWITCH_GROUP` 指定将识别到的查询切换到该资源组中,会话的后续查询仍在原资源组中执行。切换资源组的行为能够更精确地限制资源使用,对 Runaway Queries 的资源消耗做更加严格的控制。 更多信息,请参考[用户文档](/tidb-resource-control.md#query_limit-参数说明)。 -* 系统变量 `tidb_scatter_region` 支持设置集群级别的 Region 打算策略 [#55184](https://github.com/pingcap/tidb/issues/55184) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** +* 系统变量 `tidb_scatter_region` 支持设置集群级别的 Region 打散策略 [#55184](https://github.com/pingcap/tidb/issues/55184) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** - 系统变了 `tidb_scatter_region` 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打算策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。 + 系统变量 `tidb_scatter_region` 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打散策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。 为解决上述问题,从 v8.4.0 版本开始,将该系统变量改为字符串类型,且新增支持集群级别的打散策略,避免上述场景下导致 TiKV OOM 的问题。 - 更多信息,请参考[用户文档](/system-variables.md#tidb_scatter_region-从-v840-版本开始引入)。 + 更多信息,请参考[用户文档](/system-variables.md#tidb_scatter_region)。 -* 资源管控为后台任务设置资源上限 [#56019](https://github.com/pingcap/tidb/issues/56019) @[glorv](https://github.com/glorv) **tw@hfxsd** +* 支持为资源管控的后台任务设置资源上限 [#56019](https://github.com/pingcap/tidb/issues/56019) @[glorv](https://github.com/glorv) **tw@hfxsd** - TiDB 资源管控能够识别并降低后台任务的运行优先级。在部分场景下,即使有空闲资源,用户也希望后台任务消耗能够控制在很低的水平。从 v8.4.0 开始,你可以通过 `UTILIZATION_LIMIT` 指令为资源管控的后台任务设置资源百分比,每个节点把所有后台任务的使用量控制在这个百分比以下。该功能可以让你精细控制后台任务的资源占用,进一步提升集群稳定性。 + TiDB 资源管控能够识别并降低后台任务的运行优先级。在部分场景下,即使有空闲资源,用户也希望后台任务消耗能够控制在很低的水平。从 v8.4.0 开始,你可以使用参数 `UTILIZATION_LIMIT` 为资源管控的后台任务设置最大可以使用的资源百分比,每个节点把所有后台任务的使用量控制在这个百分比以下。该功能可以让你精细控制后台任务的资源占用,进一步提升集群稳定性。 更多信息,请参考[用户文档](/tidb-resource-control.md#管理后台任务)。 @@ -285,15 +285,15 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](链接)。 -* 在系统表中显示 TiDB 和 TiKV 的 CPU 时间 [#55542](https://github.com/pingcap/tidb/issues/55542) @[yibin87](https://github.com/yibin87) **tw@hfxsd** +* 在系统表中显示 TiDB 和 TiKV 的 CPU 的时间 [#55542](https://github.com/pingcap/tidb/issues/55542) @[yibin87](https://github.com/yibin87) **tw@hfxsd** - [TiDB Dashboard](/dashboard/dashboard-intro.md) 的 [TOP SQL 页面](/dashboard/top-sql.md)能够展示 CPU 消耗高的 SQL 语句。从 v8.4.0 开始,TiDB 将 CPU 时间消耗信息加入系统表展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测。在实例 CPU 飙升或集群读写热点的场景下,这些信息能够协助你快速发现问题的原因。 + [TiDB Dashboard](/dashboard/dashboard-intro.md) 的 [Top SQL 页面](/dashboard/top-sql.md)能够展示 CPU 消耗高的 SQL 语句。从 v8.4.0 开始,TiDB 将 CPU 时间消耗信息加入系统表展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测。在实例 CPU 飙升或集群读写热点的场景下,这些信息能够协助你快速发现问题的原因。 - [`STATEMENTS_SUMMARY`](/statement-summary-tables.md) 增加 `AVG_TIDB_CPU_TIME` 和 `AVG_TIKV_CPU_TIME`,显示单个 SQL 语句在历史上消耗的平均 CPU 的时间。 - [`INFORMATION_SCHEMA.PROCESSLIST`](/information-schema/information-schema-processlist.md) 增加 `TIDB_CPU` 和 `TIKV_CPU`,显示会话当前正在执行 SQL 的累计 CPU 消耗。 - [慢日志](/analyze-slow-queries.md)中增加字段 `Tidb_cpu_time` 和 `Tikv_cpu_time`,显示被捕捉到的 SQL 语句的 CPU 的时间。 - 其中,TiKV 的 CPU 时间默认显示。采集 TiDB 的 CPU 时间会引入额外开销(约 8%),因此仅在开启 [Top SQL 特性](/dashboard/top-sql.md)时,TiDB 的 CPU 时间才会显示为实际值,否则始终显示为 `0`。 + 其中,TiKV 的 CPU 时间默认显示。采集 TiDB 的 CPU 时间会引入额外开销(约 8%),因此仅在开启 [Top SQL 特性](/dashboard/top-sql.md)时,TiDB 的 CPU 时间才会显示为实际值,否则始终显示为 `0`。 更多信息,请参考[用户文档](/information-schema/information-schema-processlist.md)和[用户文档](information-schema/information-schema-slow-query.md)。 @@ -307,10 +307,9 @@ TiDB 版本:8.4.0 * BR 支持 AWS IMDSv2 [#16443](https://github.com/tikv/tikv/issues/16443) @[pingyu](https://github.com/pingyu) **tw@hfxsd** - TiDB BR now supports AWS's Instance Metadata Service Version 2 (IMDSv2) when deployed on AWS EC2. This enables users to configure the newer session-oriented method on their EC2 instances, and for BR to be able to successfully use the IAM Role associated with the instance to access AWS S3 with the appropriate privileges. - 在 AWS EC2 上部署时,TiDB BR 支持 AWS 的 Instance Metadata Service Version 2 (IMDSv2)。你可以在 EC2 实例上配置较新的面向会话的方法,BR 也可以使用与实例关联的 IAM 角色以适当的权限访问 AWS S3。 + 在 AWS EC2 上部署 TiDB 时,BR 支持 AWS 的 Instance Metadata Service Version 2 (IMDSv2)。你可以在 EC2 实例上进行相关配置,使 BR 可以使用与实例关联的 IAM 角色以适当的权限访问 AWS S3。 - 更多信息,请参考[用户文档](/backup-and-restore-storages#authentication)。 + 更多信息,请参考[用户文档](/br/backup-and-restore-storages.md#鉴权)。 ### 数据迁移 @@ -389,7 +388,7 @@ TiDB 版本:8.4.0 - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + TiKV - - 默认 Region 大小由 96 MB 提升到 256 MB,避免 Region 数量过多带来的额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** + - Region 的默认值由 96 MiB 提升到 256 MiB,避免 Region 数量过多导致额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - 增加配置项指定单 region 和 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多情况,可修改配置提升内存上限避免悲观锁落盘相关 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@qiancai** From cbf264fe105a85aa6f45cfd25cf73d1550ff10a4 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Mon, 23 Sep 2024 10:49:36 +0800 Subject: [PATCH 045/127] Apply suggestions from code review Co-authored-by: Frank945946 <108602632+Frank945946@users.noreply.github.com> --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index afe4632890c1..d7a6fbcfd770 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -148,7 +148,7 @@ TiDB 版本:8.4.0 从 v8.3.0 开始,全局索引作为实验特性正式发布。你可通过关键字 `GLOBAL` 为分区表显式创建一个全局索引,从而去除分区表唯一键必须包含分区表达式中用到的所有列的限制,满足灵活的业务需求。同时基于全局索引也提升了非分区列的查询性能。 - 在 v8.4.0 中,全局索引成为正式功能 (GA)。 + 在 v8.4.0 中,全局索引成为正式功能 (GA)。你无需再设置系统变量 [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) 开启全局索引特性,可以直接使用关键字 `GLOBAL` 创建全局索引。 更多信息,请参考[用户文档](/partitioned-table.md#全局索引)。 @@ -341,7 +341,7 @@ TiDB 版本:8.4.0 | tidb_pre_split_regions | 新增 | 原先 ‘pre_split_regions’ 需要在每个 Create Table SQL 语句里声明,一旦需要同样配置的表数量较多,操作复杂,因此引入该变量,可在 Global 或 Session 级别设置该系统变量,提升易用性 | | [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | | [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 原有的 TiDB Hash Join 算法效率不佳,引入新的 HashJoin 版本,实现更加高效的计算 | - +| `tidb_enable_global_index` | 废弃 | 从 v8.4.0 开始,全局索引功能成为正式功能(GA),你无需通过该系统变量来开启全局索引,只需在执行 `CREATE TABLE` 或 `ALTER TABLE` 时在对应的列加上 `GLOBAL` 关键字即可创建全局索引。 | ### 配置文件参数 From 974c26259c3121236392141bf21a6fe7ef299a59 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Mon, 23 Sep 2024 13:16:26 +0800 Subject: [PATCH 046/127] Apply suggestions from code review Co-authored-by: lucasliang --- releases/release-8.4.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index d7a6fbcfd770..36dce0875113 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -350,6 +350,7 @@ TiDB 版本:8.4.0 | TiKV | grpc-keepalive-timeout | 修改 | 该配置文件参数原先为 int 类型,且最小值仅支持设置为 1,从 v8.3.0 开始,数据类型修改为 float64 ,且最小值支持设置为 0.05,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | | TiKV | in_memory_peer_size_limit | 新增 | 该配置文件参数用于指定单 region 的内存悲观锁的内存上限 | | TiKV | in_memory_global_size_limit | 新增 | 该配置文件参数用于指定 TiKV 实例的内存悲观锁的内存上限 | +| TiKV | [`raft-engine.spill-dir`](/tikv-configuration-file.md#spill-dir-从-v840-版本开始引入) | 新增 | 该配置文件参数用于指定 TiKV 实例存储 Raft 日志文件的辅助目录,用于支持多盘存储 Raft 日志文件 | | | | | | ### 系统表 @@ -390,7 +391,7 @@ TiDB 版本:8.4.0 - Region 的默认值由 96 MiB 提升到 256 MiB,避免 Region 数量过多导致额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - 增加配置项指定单 region 和 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多情况,可修改配置提升内存上限避免悲观锁落盘相关 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@qiancai** - +- Raft Engine 新增 `spill-dir` 配置,支持 Raft 日志的多磁盘存储。当主目录 `dir `所在磁盘的容量不足时,Raft Engine 会自动将新日志写入 `spill-dir`,从而确保系统的持续运行。[LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** + PD From a99c92d08640519c7c938ae5560aa45f343f52db Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Mon, 23 Sep 2024 14:34:16 +0800 Subject: [PATCH 047/127] Apply suggestions from code review --- releases/release-8.4.0.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 36dce0875113..52b26e21922c 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -41,16 +41,16 @@ TiDB 版本:8.4.0 - + - + - - + + @@ -76,11 +76,11 @@ TiDB 版本:8.4.0 - + - + From ca38a768b745bdbd4beadb69bb00d4bba8d413d5 Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 23 Sep 2024 16:41:44 +0800 Subject: [PATCH 048/127] update TiProxy traffic replay Signed-off-by: Aolin --- releases/release-8.4.0.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 52b26e21922c..c727bc9d7844 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -198,17 +198,18 @@ TiDB 版本:8.4.0 ### 高可用 -* TiProxy 支持流量回放功能(实验特性) [#642](https://github.com/pingcap/tiproxy/issues/642) @[djshow832](https://github.com/djshow832) **tw@Oreoxmt** +* TiProxy 支持流量回放功能(实验特性)[#642](https://github.com/pingcap/tiproxy/issues/642) @[djshow832](https://github.com/djshow832) **tw@Oreoxmt** - 从 TiProxy v1.3.0 版本开始,TiProxy 将支持流量捕获回放功能。该功能可以从 TiDB 生产集群中捕获所有的访问流量,并在测试集群中按照指定的速率进行回放,验证所有 SQL 的执行结果和性能表现。 + 从 TiProxy v1.3.0 开始,你可以使用 TiProxy 捕获 TiDB 生产集群中的访问流量,并在测试集群中按照指定的速率回放这些流量。通过该功能,你可以在测试环境中重现生产集群的实际工作负载,从而验证所有 SQL 的执行结果和性能表现。 + + 流量回放适用于以下场景: - 该功能适用于以下场景: - TiDB 版本升级前验证 - 执行变更前影响评估 - TiDB 扩缩容前性能验证 - - 测试集群性能上限 + - 集群性能上限测试 - 你可以通过 `tiproxyctrl` 命令连接 TiProxy 实例,进行流量捕获、回放。 + 你可以使用 `tiproxyctrl` 连接 TiProxy 实例,并进行流量捕获和回放。 更多信息,请参考[用户文档](/tiproxy/tiproxy-traffic-replay.md)。 From d3ccb3451b43d45ebf1246da4853300216ccc96a Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 23 Sep 2024 17:22:50 +0800 Subject: [PATCH 049/127] update TiKV in-mem pessimistic lock and BR RESTORE SQL statement Signed-off-by: Aolin --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index c727bc9d7844..3c9184201808 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -391,7 +391,7 @@ TiDB 版本:8.4.0 + TiKV - Region 的默认值由 96 MiB 提升到 256 MiB,避免 Region 数量过多导致额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - - 增加配置项指定单 region 和 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多情况,可修改配置提升内存上限避免悲观锁落盘相关 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@qiancai** + - 支持指定单个 Region 或 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多的情况下,可以通过修改配置提高内存上限,避免悲观锁落盘导致的 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@Oreoxmt** - Raft Engine 新增 `spill-dir` 配置,支持 Raft 日志的多磁盘存储。当主目录 `dir `所在磁盘的容量不足时,Raft Engine 会自动将新日志写入 `spill-dir`,从而确保系统的持续运行。[LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** + PD @@ -406,7 +406,7 @@ TiDB 版本:8.4.0 - 集群恢复时同时设置 `split-table=false` 和 `split-region-on-table=false`,优化 region 的分配策略 [#53532](https://github.com/pingcap/tidb/issues/53532) @[Leavrth](https://github.com/Leavrth) **tw@qiancai** - - 默认不允许使用 SQL 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + - 默认不支持使用 SQL 语句 `RESTORE` 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + TiCDC From d4dc9bfb80dca00fc0a61948c34681496ecf44b8 Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 23 Sep 2024 17:31:14 +0800 Subject: [PATCH 050/127] highlights: update TiProxy traffic replay --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 3c9184201808..9028ceae46b7 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -53,8 +53,8 @@ TiDB 版本:8.4.0 - - + + From cfb4df36dfed554fd36d8675a5e6a65c9c37fb04 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Mon, 23 Sep 2024 18:00:01 +0800 Subject: [PATCH 051/127] Update highlight wording Co-authored-by: xixirangrang --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 9028ceae46b7..f0350afaef46 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -45,8 +45,8 @@ TiDB 版本:8.4.0 - - + + From 74bf2f6d933e509c3963d615769bd84f23c23411 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Mon, 23 Sep 2024 18:05:48 +0800 Subject: [PATCH 052/127] Update format and wording Co-authored-by: xixirangrang --- releases/release-8.4.0.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index f0350afaef46..09d20bd78281 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -40,16 +40,16 @@ TiDB 版本:8.4.0 - + - + - + @@ -62,7 +62,7 @@ TiDB 版本:8.4.0 - + @@ -71,8 +71,8 @@ TiDB 版本:8.4.0 - - + + From 404e91993baa5b0a3e430aed154fb3ce6f9b2722 Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 24 Sep 2024 10:56:12 +0800 Subject: [PATCH 053/127] Update format --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 09d20bd78281..bbfde68c94aa 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -177,7 +177,7 @@ TiDB 版本:8.4.0 * 系统变量 `tidb_scatter_region` 支持设置集群级别的 Region 打散策略 [#55184](https://github.com/pingcap/tidb/issues/55184) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** 系统变量 `tidb_scatter_region` 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打散策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。 - + 为解决上述问题,从 v8.4.0 版本开始,将该系统变量改为字符串类型,且新增支持集群级别的打散策略,避免上述场景下导致 TiKV OOM 的问题。 更多信息,请参考[用户文档](/system-variables.md#tidb_scatter_region)。 From 77add80e2a95ea3ba0e18950c7838c284a29d87b Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Tue, 24 Sep 2024 11:50:18 +0800 Subject: [PATCH 054/127] Apply suggestions from code review --- releases/release-8.4.0.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index bbfde68c94aa..5612997a2672 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -334,25 +334,35 @@ TiDB 版本:8.4.0 | 变量名 | 修改类型(包括新增/修改/删除) | 描述 | |--------|------------------------------|------| +| [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用[全局索引](/partitioned-table.md#全局索引)。你只需在执行 `CREATE TABLE` 或 `ALTER TABLE` 时在对应的列加上关键字 `GLOBAL` 即可创建全局索引。 | +| [`tidb_enable_list_partition`](/system-variables.md#tidb_enable_list_partition-从-v50-版本开始引入) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用 [List 分区](/partitioned-table.md#list-分区)。 | +| [`tidb_enable_table_partition`](/system-variables.md#tidb_enable_table_partition) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用[分区表](/partitioned-table.md)。| +| [`tidb_opt_prefer_range_scan`](/system-variables.md#tidb_opt_prefer_range_scan-从-v50-版本开始引入) | 修改 | 从 v8.4.0 开始,此变量的默认值从 `OFF` 更改为 `ON`。对于没有统计信息的表(伪统计信息)或空表(零统计信息),优化器将优先选择区间扫描而不是全表扫描。| +| [`tidb_scatter_region`](/system-variables.md#tidb_scatter_region) | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 Region 只支持表级别打散。从 v8.4.0 开始,增加 `SESSION` 作用域,类型由布尔型变更为枚举型,默认值由原来的 `OFF` 变更为 ``,并增加了可选值 `TABLE` 和 `GLOBAL`。支持集群级别的打算策略,避免快速批量建表时由于 Region 分布不均匀导致 TiKV OOM 的问题。| | [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值改为 `ON`。当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join | | [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)| 新增 | 这个变量控制是否开启 Instance Plan Cache 功能。 | | [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的目标内存大小,超过这个大小则触发清理。| -| tidb_scatter_region | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 region 只支持表级别打散,v8.3.0 开始改成字符串型,并新增支持集群级别的打算策略,避免快速批量建表时由于 region 分布不均匀导致 TiKV OOM 的问题 | -| tidb_shard_row_id_bits | 新增 | 原先 ‘shard_row_id_bits’ 需要在每个 Create Table 或 Alter Table 的 SQL 语句里声明,一旦需要同样配置的表数量较多,操作复杂,因此引入该变量,可在 Global 或 Session 级别设置该系统变量,提升易用性 | -| tidb_pre_split_regions | 新增 | 原先 ‘pre_split_regions’ 需要在每个 Create Table SQL 语句里声明,一旦需要同样配置的表数量较多,操作复杂,因此引入该变量,可在 Global 或 Session 级别设置该系统变量,提升易用性 | +| [`tidb_pre_split_regions`](/system-variables.md#tidb_pre_split_regions-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行分裂分片数,需要在每个 `CREATE TABLE` SQL 语句里声明 `PRE_SPLIT_REGIONS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | +| [`tidb_shard_row_id_bits`](/system-variables.md#tidb_shard_row_id_bits-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行 ID 的分片位数,需要在每个 `CREATE TABLE` 或 `ALTER TABLE` 的 SQL 语句里声明 `SHARD_ROW_ID_BITS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | | [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 原有的 TiDB Hash Join 算法效率不佳,引入新的 HashJoin 版本,实现更加高效的计算 | -| `tidb_enable_global_index` | 废弃 | 从 v8.4.0 开始,全局索引功能成为正式功能(GA),你无需通过该系统变量来开启全局索引,只需在执行 `CREATE TABLE` 或 `ALTER TABLE` 时在对应的列加上 `GLOBAL` 关键字即可创建全局索引。 | ### 配置文件参数 | 配置文件 | 配置项 | 修改类型 | 描述 | | -------- | -------- | -------- | -------- | -| TiKV | grpc-keepalive-timeout | 修改 | 该配置文件参数原先为 int 类型,且最小值仅支持设置为 1,从 v8.3.0 开始,数据类型修改为 float64 ,且最小值支持设置为 0.05,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | +| TiDB | [`grpc-keepalive-time`](/tidb-configuration-file.md#grpc-keepalive-time) | 修改 | 增加最小值 `1`。 | +| TiDB | [`grpc-keepalive-timeout`](/tidb-configuration-file.md#grpc-keepalive-timeout) | 修改 | 该配置文件参数原先为 INT 类型,且最小值仅支持设置为 `1`。从 v8.4.0 开始,数据类型修改为 FLOAT64,且最小值支持设置为 `0.05`,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | +| TiKV | [`region-split-keys`](/tikv-configuration-file.md#region-split-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `"2560000"`。在 v8.4.0 之前,默认值为 `"960000"`。 | +| TiKV | [`region-split-size`](/tikv-configuration-file.md#region-split-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `"256MiB"`。在 v8.4.0 之前,默认值为 `"96MiB"`。 | +| TiKV | [`sst-max-size`](/tikv-configuration-file.md#sst-max-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `"384MiB"`。在 v8.4.0 之前,默认值为 `"144MiB"`。 | | TiKV | in_memory_peer_size_limit | 新增 | 该配置文件参数用于指定单 region 的内存悲观锁的内存上限 | | TiKV | in_memory_global_size_limit | 新增 | 该配置文件参数用于指定 TiKV 实例的内存悲观锁的内存上限 | | TiKV | [`raft-engine.spill-dir`](/tikv-configuration-file.md#spill-dir-从-v840-版本开始引入) | 新增 | 该配置文件参数用于指定 TiKV 实例存储 Raft 日志文件的辅助目录,用于支持多盘存储 Raft 日志文件 | -| | | | | +| TiKV | [`resource-control.priority-ctl-strategy`](/tikv-configuration-file.md#priority-ctl-strategy-从-v840-版本开始引入) | 新增 | 该配置文件参数用于配置低优先级任务的管控策略。TiKV 通过对低优先级的任务添加流量控制来确保优先执行更高优先级的任务。 | +| PD | [`max-merge-region-keys`](/pd-configuration-file.md#max-merge-region-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `540000`。在 v8.4.0 之前,默认值为 `200000`。 | +| PD | [`max-merge-region-size`](/pd-configuration-file.md#max-merge-region-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `54`。在 v8.4.0 之前,默认值为 `20`。 | + ### 系统表 From 5d2b70639eec82d8b9c382b966086eca8e09d118 Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 24 Sep 2024 15:01:59 +0800 Subject: [PATCH 055/127] update TiCDC and removal of TiDB Binlog Signed-off-by: Aolin --- releases/release-8.4.0.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 5612997a2672..daaab357ba9f 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -314,11 +314,17 @@ TiDB 版本:8.4.0 ### 数据迁移 -* 功能标题 [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@xxx** +* TiCDC claim check nows supports raw value format [#11396](https://github.com/pingcap/tiflow/issues/11396) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** - 功能描述(需要包含这个功能是什么、在什么场景下对用户有什么价值、怎么用) + When TiCDC used the claim check capability to handle large messages it included both the Key and the Value are encoded and stored in the external storage system. With the new raw value option, TiCDC can now be configured to store the value format only in the external storage system, using the protocol encoding. - 更多信息,请参考[用户文档](链接)。 + For more information, see [documentation](ticdc-sink-to-kafka.md#send-large-messages-to-external-storage). + +* TiCDC introduces new row checksum to verify old values after Add and Drop Column operations [#10969](https://github.com/pingcap/tiflow/issues/10969) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** + + Starting from v8.4.0, TiDB and TiCDC introduce Checksum V2 to address issues with Checksum V1 in verifying old values in Update or Delete events after Add Column or Drop Column operations. For new clusters created in v8.4.0 or later, or clusters upgraded to v8.4.0, TiDB uses Checksum V2 by default when single-row data checksum verification is enabled. TiCDC supports handling both Checksum V1 and V2. This change only affects TiDB and TiCDC internal implementation and does not impact checksum calculation methods for downstream Kafka consumers. + + For more information, see [documentation](/ticdc-integrity-check.md). ## 兼容性变更 @@ -370,6 +376,10 @@ TiDB 版本:8.4.0 ## 废弃功能 +* 以下为从 v8.4.0 开始已移除的功能: + + * TiDB Binlog replication is now removed from this version. Starting from v8.3.0, TiDB Binlog was fully deprecated. For incremental data replication, use [TiCDC](/ticdc-overview.md) instead. For point-in-time recovery (PITR), use [PITR](/br-pitr-guide.md). **tw@lilin90** + * 以下为从 v8.4.0 开始已废弃的功能: * 废弃功能 1 From 7d4cfd9dd4b13bfcaac69b0c61ee5c080af9d459 Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 24 Sep 2024 15:16:08 +0800 Subject: [PATCH 056/127] Apply suggestions from code review --- releases/release-8.4.0.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index daaab357ba9f..a2d11424f025 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -24,8 +24,8 @@ TiDB 版本:8.4.0 - - + + @@ -57,8 +57,8 @@ TiDB 版本:8.4.0 - - + + @@ -125,16 +125,16 @@ TiDB 版本:8.4.0 在 SaaS 场景下,你可能需要在指定时间内批量创建大量用户、以及定期轮换所有用户密码。从 v8.4.0 开始,提升了批量创建用户、批量修改用户密码的性能,而且你可以通过增加会话连接数来提升并发,提升性能,从而大幅缩短该场景下的执行时间。 -* 实例中的会话共享执行计划缓存 (实验特性) [#issue号](链接) @[qw4990](https://github.com/qw4990) **tw@Oreoxmt** +* 实例级执行计划缓存(实验特性)[#54057](https://github.com/pingcap/tidb/issues/54057) @[qw4990](https://github.com/qw4990) **tw@Oreoxmt** - 相比会话级执行计划缓存,执行计划缓存在会话间共享有明显的优势: + TiDB v8.4.0 引入实例级执行计划缓存作为实验特性。该功能允许同一个 TiDB 实例的所有会话共享执行计划缓存,能够大幅降低 TiDB 的时延、提升集群吞吐、减少执行计划突变的可能性、保持集群性能的稳定,是 TiDB 改善性能和稳定性的重要改进。相比会话级执行计划缓存,实例级执行计划缓存具有以下优势: - - 消除冗余,相同的内存消耗下能缓存更多的执行计划。 - - 在实例上开辟固定大小的内存区域,能更有效的对内存进行限制。 + - 消除冗余,在相同的内存消耗下缓存更多执行计划。 + - 在实例上分配固定大小的内存区域,更有效地限制内存使用。 - 在 v8.4.0 中,实例级执行计划缓存作为实验特性,只支持对查询的执行计划进行缓存,默认关闭,通过设置系统变量 [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入) 开启,缓存最大值通过变量 [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) 设置。同时,会话执行计划缓存需要保持关闭状态,具体参见 [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md) 和 [非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 + 在 v8.4.0 中,实例级执行计划缓存仅支持对查询的执行计划进行缓存,默认关闭。你可以通过系统变量 [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入) 开启该功能,并通过系统变量 [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) 设置其最大内存使用量。开启该功能之前,请关闭关闭会话级别的 [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md) 和 [非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 - 实例级执行计划缓存能够大幅降低 TiDB 的时延,提升集群吞吐,并能够减少执行计划突变的机会,保持集群性能的稳定,是 TiDB 改善性能和稳定性的重要改进。 + 更多信息,请参考[用户文档](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)。 * `Lightning` 的逻辑导入支持 prepare 接口 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) @[qw4990](https://github.com/qw4990) **tw@lilin90** @@ -402,11 +402,11 @@ TiDB 版本:8.4.0 - 优化扫描大量数据时构造 BatchCop Task 的效率 [#55915](https://github.com/pingcap/tidb/issues/55915) [#55413](https://github.com/pingcap/tidb/issues/55413) @[wshwsh12](https://github.com/wshwsh12) **tw@caiqian** - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** - 优化 BULK 模式 DML 的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - - 优化器估行的最小值为`1`,与其他数据库行为一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** + - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制是否将优化器为 `estRows` 估算的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** - - 减少部分场景的 DELETE 操作从 TiKV 获取的列信息数量,降低 DELETE 操作的资源开销。[#issue号](链接) [winoros](https://github.com/winoros) **tw@Oreoxmt** - - 优化 Priority Queue 基于 Meta Cache V2 的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) [Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** + - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** + - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + TiKV From 9dc02e332bac05bb8368958a2870ef8de8a5712e Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 24 Sep 2024 16:35:54 +0800 Subject: [PATCH 057/127] Update wording and format --- releases/release-8.4.0.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index a2d11424f025..d92e18e9f9b5 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -136,11 +136,11 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)。 -* `Lightning` 的逻辑导入支持 prepare 接口 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) @[qw4990](https://github.com/qw4990) **tw@lilin90** +* TiDB Lightning 的逻辑导入支持 prepare 接口 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) @[qw4990](https://github.com/qw4990) **tw@lilin90** - 通过开启配置 [`logical-import-prep-stmt`](),`Lightning` 逻辑导入产生的 SQL 语句将会通过 prepare 接口执行,提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 + 通过开启配置 `logical-import-prep-stmt`,TiDB Lightning 逻辑导入产生的 SQL 语句将通过 prepare 接口执行,可提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 - 更多信息,请参考[用户文档]() + 更多信息,请参考[用户文档](tidb-lightning/tidb-lightning-configuration.md)。 * 分区表的全局索引成为正式功能 (GA) [#45133](https://github.com/pingcap/tidb/issues/45133) @[mjonss](https://github.com/mjonss)@[Defined2014](https://github.com/Defined2014) **tw@hfxsd** # @@ -151,17 +151,17 @@ TiDB 版本:8.4.0 在 v8.4.0 中,全局索引成为正式功能 (GA)。你无需再设置系统变量 [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) 开启全局索引特性,可以直接使用关键字 `GLOBAL` 创建全局索引。 更多信息,请参考[用户文档](/partitioned-table.md#全局索引)。 - + * 优化了缓存表在部分场景下的查询性能 [#43249](https://github.com/pingcap/tidb/issues/43249) @[tiancaiamao](https://github.com/tiancaiamao) **tw@hfxsd** 优化了缓存表的查询性能,在使用 `IndexLookup` 执行 `SELECT ... LIMIT 1` 时,性能最高提升 5.4 倍。同时,提升了 `IndexLookupReader` 在全表扫描和主键查询场景下的性能。 - + ### 稳定性 * 超出预期的查询 (Runaway Queries) 新增 "处理行数" 和 RU 作为阈值 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** TiDB 在 v8.4.0 可以依据 "处理行数 (`PROCESSED_KEYS`)" 和 "Request Unit (`RU`)" 定义超出预期的查询。和"执行时间(`EXEC_ELAPSED`)"相比,新增阈值能够更准确的定义查询的资源消耗,避免整体性能下降时发生识别偏差。 - + 支持同时设置多个条件,满足任意条件即识别为 `Runaway Queries`。 用户可以观测 [`Statement Summary Tables`](/statement-summary-tables.md) 中的几个对应字段 (`RESOURCE_GROUP`、`MAX_REQUEST_UNIT_WRITE`、`MAX_REQUEST_UNIT_READ`、`MAX_PROCESSED_KEYS`),根据历史执行情况决定条件值的大小。 From 27af2f5ccb14aeef7f77b0fad24e18fc9cbe5c7c Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 24 Sep 2024 16:58:16 +0800 Subject: [PATCH 058/127] fix tidb_enable_inl_join_inner_multi_pattern Co-authored-by: Grace Cai --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index d92e18e9f9b5..52917ff12806 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -404,7 +404,7 @@ TiDB 版本:8.4.0 - 优化 BULK 模式 DML 的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制是否将优化器为 `estRows` 估算的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@qiancai** + - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** From 306f1e25fdf9498cf21ed08b23f6658957701932 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Tue, 24 Sep 2024 17:29:32 +0800 Subject: [PATCH 059/127] Update wording --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 52917ff12806..fe2f780afb76 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -138,7 +138,7 @@ TiDB 版本:8.4.0 * TiDB Lightning 的逻辑导入支持 prepare 接口 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) @[qw4990](https://github.com/qw4990) **tw@lilin90** - 通过开启配置 `logical-import-prep-stmt`,TiDB Lightning 逻辑导入产生的 SQL 语句将通过 prepare 接口执行,可提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 + 通过开启配置项 `logical-import-prep-stmt`,TiDB Lightning 逻辑导入产生的 SQL 语句将通过 prepare 接口执行,可提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 更多信息,请参考[用户文档](tidb-lightning/tidb-lightning-configuration.md)。 From c279c34d010b72b1ef218159b0c3af89c96c7f9a Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 24 Sep 2024 18:14:56 +0800 Subject: [PATCH 060/127] Update and correct descriptions --- releases/release-8.4.0.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index fe2f780afb76..4c4093b4da43 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -158,13 +158,13 @@ TiDB 版本:8.4.0 ### 稳定性 -* 超出预期的查询 (Runaway Queries) 新增 "处理行数" 和 RU 作为阈值 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** +* 超出预期的查询 (Runaway Queries) 新增处理行数 和 RU 作为阈值 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - TiDB 在 v8.4.0 可以依据 "处理行数 (`PROCESSED_KEYS`)" 和 "Request Unit (`RU`)" 定义超出预期的查询。和"执行时间(`EXEC_ELAPSED`)"相比,新增阈值能够更准确的定义查询的资源消耗,避免整体性能下降时发生识别偏差。 + 从 v8.4.0 开始, TiDB 可以依据处理行数 (`PROCESSED_KEYS`) 和 Request Unit (`RU`) 定义超出预期的查询。和执行时间 (`EXEC_ELAPSED`) 相比,新增阈值能够更准确地定义查询的资源消耗,避免整体性能下降时发生识别偏差。 支持同时设置多个条件,满足任意条件即识别为 `Runaway Queries`。 - 用户可以观测 [`Statement Summary Tables`](/statement-summary-tables.md) 中的几个对应字段 (`RESOURCE_GROUP`、`MAX_REQUEST_UNIT_WRITE`、`MAX_REQUEST_UNIT_READ`、`MAX_PROCESSED_KEYS`),根据历史执行情况决定条件值的大小。 + 可以观测 [Statement Summary Tables](/statement-summary-tables.md) 中的几个对应字段 (`RESOURCE_GROUP`、`MAX_REQUEST_UNIT_WRITE`、`MAX_REQUEST_UNIT_READ`、`MAX_PROCESSED_KEYS`),根据历史执行情况决定条件值的大小。 更多信息,请参考[用户文档](/tidb-resource-control.md#管理资源消耗超出预期的查询-runaway-queries)。 @@ -226,12 +226,13 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/vector-search-overview.md)。 -* TiDB 外键约束检查功能成为正式功能(GA) [#issue号](链接) @[贡献者 GitHub ID](链接) **tw@lilin90** +* TiDB 外键约束检查功能成为正式功能 (GA) [#55861](链接) @[GitHub ID-TBD](https://github.com/pingcap/tidb/issues/55861) **tw@lilin90** - TiDB 从 v6.6.0 版本开始,可通过变量 foreign_key_checks 做外键约束检查,但是其一直为实验特性。v8.3.0 对外键特性在更多场景做了覆盖测试,稳定性和性能方面也有一些提升,因此从 v8.3.0 开始外键功能成为正式功能(GA) + 从 v6.6.0 开始,TiDB 支持通过系统变量 [`foreign_key_checks`](/system-variables.md#foreign_key_checks) 做外键约束检查,但一直为实验特性。v8.4.0 对外键特性在更多场景做了覆盖测试,提升了稳定性和性能,因此从 v8.4.0 开始,外键功能成为正式功能 (GA)。 - 更多信息,请参考[用户文档](链接)。 -* 支持字符集 GB18030 和排序规则 gb18030_bin 和 gb18030_general_ci [#issue号](链接) @[cbcwestwolf](https://github.com/cbcwestwolf) **tw@lilin90** + 更多信息,请参考[用户文档](/foreign-key.md)。 + +* 支持字符集 `gb18030` 和排序规则 `gb18030_bin` 和 `gb18030_general_ci` [#issue号](链接) @[cbcwestwolf](https://github.com/cbcwestwolf) **tw@lilin90** 新增字符集支持:TiDB v8.4 新增了对 GB18030 字符集的支持,这是一个广泛用于中文字符编码的标准,确保 TiDB 能够更好地处理中文相关的数据存储和查询需求。 From ec7c7162d56a5f91ca542396c1970e79efa6955a Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 09:55:38 +0800 Subject: [PATCH 061/127] Remove inapplicable content and update wording --- releases/release-8.4.0.md | 41 ++++----------------------------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 4c4093b4da43..e57d668165ae 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -70,11 +70,7 @@ TiDB 版本:8.4.0 - - - - - + @@ -188,7 +184,7 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/tidb-resource-control.md#管理后台任务)。 -* 优化资源组资源分配策略 [#issue号](链接) @[nolouch](https://github.com/nolouch) **tw@lilin90** +* 优化资源组资源分配策略 [#50831](https://github.com/pingcap/tidb/issues/50831) @[nolouch](https://github.com/nolouch) **tw@lilin90** TiDB 在 v8.4.0 部分调整了资源分配策略,更好的满足客户对资源管控的预期。 @@ -258,35 +254,6 @@ TiDB 版本:8.4.0 ### 可观测性 -* 持久化部分内存表的快照 (实验特性) [#issue号](链接) @[xhebox](https://github.com/xhebox) **tw@lilin90** - - TiDB 的内存表中会保存很多运行时状态信息,比如会话状态、锁状态、SQL 运行状态等,用户可以据此了解数据库运行情况,这些信息被大量用在故障诊断和性能调优的场景。实际使用中会遇到几个问题: - - - 内存表中的信息会随 TiDB 实例的关闭而消失 - - 用户无法追溯过去某个时间的状态信息 - - 为了解决上述问题,受流行商业数据库的启发,TiDB 新增对内存表持久化的能力,为 TiDB 构建 `Workload Repository`。通过设置变量 [`tidb_workload_repository_dest`]() 为 `SCHEMA`, TiDB 将内存表中的信息阶段性写入特定数据库 (`WORKLOAD_SCHEMA`),持久化到 TiKV 中。持久化的数据大体有两类用途: - - - **故障定位**:获取过去某一段时间的数据库运行情况,分析故障可能的原因。 - - **自动运维**:对数据库的历史负载进行分析,发现潜在的优化点,并得出优化建议。比如索引推荐,SQL 调优推荐等。 - - 被持久化的内存表大体分为两类: - - 一类是保存累计运行指标的内存表,通常体积较大,快照一次有明显开销。这类内存表默认每 60 分钟记录一次快照,通过系统变量 [`tidb_workload_repository_snapshot_interval`]() 修改快照间隔。包括: - - - SQL 语句运行指标 - - 索引运行指标 - - 另一类内存表显示实时状态信息,会被快速刷新。这类内存记录默认每秒采样一次,通过系统变量 [`tidb_workload_repository_active_sampling_interval`]() 修改采样间隔。这类表包括: - - - 活动会话的状态 - - 锁状态 - - 活动事务状态 - - TiDB `Workload Repository` 的引入,极大地提升了数据库的可观测性,并为未来的自动化运维工作提供了数据基础。在接下来的版本,TiDB 会加入更多的内存观测指标,并持久化到 `Workload Repository`,通过提供丰富的工具、报告、建议,协助用户的管理工作,提升运维 TiDB 集群的效率。 - - 更多信息,请参考[用户文档](链接)。 - * 在系统表中显示 TiDB 和 TiKV 的 CPU 的时间 [#55542](https://github.com/pingcap/tidb/issues/55542) @[yibin87](https://github.com/yibin87) **tw@hfxsd** [TiDB Dashboard](/dashboard/dashboard-intro.md) 的 [Top SQL 页面](/dashboard/top-sql.md)能够展示 CPU 消耗高的 SQL 语句。从 v8.4.0 开始,TiDB 将 CPU 时间消耗信息加入系统表展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测。在实例 CPU 飙升或集群读写热点的场景下,这些信息能够协助你快速发现问题的原因。 @@ -299,9 +266,9 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/information-schema/information-schema-processlist.md)和[用户文档](information-schema/information-schema-slow-query.md)。 -* TOP SQL 可按 `Schema` 或 `Table` 维度聚合 [#issue号](链接) @[nolouch](https://github.com/nolouch) **tw@lilin90** +* TOP SQL 支持按表或数据库维度查看聚合结果 [#55540](https://github.com/pingcap/tidb/issues/55540) @[nolouch](https://github.com/nolouch) **tw@lilin90** - 当前的 [TOP SQL](/dashboard/top-sql.md) 以 SQL 为单位来聚合 CPU 时间。如果 CPU 时间不是由少数几个 SQL 贡献,按 SQL 聚合并不能有效发现问题。从 v8.4.0 开始,用户可以选择按照 `Schema` 或 `Table` 聚合 CPU 时间。在多系统融合的场景下,新的聚合方式能够更有效地识别来自某个特定系统的负载变化,提升问题诊断的效率。 + 在 v8.4.0 之前,[TOP SQL](/dashboard/top-sql.md) 以 SQL 为单位来聚合 CPU 时间。如果 CPU 时间不是由少数几个 SQL 贡献,按 SQL 聚合并不能有效发现问题。从 v8.4.0 开始,你可以选择 **By TABLE** 或者 **By DB** 聚合 CPU 时间。在多系统融合的场景下,新的聚合方式能够更有效地识别来自某个特定系统的负载变化,提升问题诊断的效率。 更多信息,请参考[用户文档](/dashboard/top-sql.md)。 From b589c11fd76195221a0f0852619f63f769ddbf97 Mon Sep 17 00:00:00 2001 From: CbcWestwolf <1004626265@qq.com> Date: Wed, 25 Sep 2024 10:29:51 +0800 Subject: [PATCH 062/127] Update releases/release-8.4.0.md Co-authored-by: Lilian Lee --- releases/release-8.4.0.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index e57d668165ae..820d5bccc176 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -228,15 +228,15 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/foreign-key.md)。 -* 支持字符集 `gb18030` 和排序规则 `gb18030_bin` 和 `gb18030_general_ci` [#issue号](链接) @[cbcwestwolf](https://github.com/cbcwestwolf) **tw@lilin90** +* 支持字符集 `gb18030` 和排序规则 `gb18030_bin` 和 `gb18030_chinese_ci` [#17470](https://github.com/tikv/tikv/issues/17470) [#55791](https://github.com/pingcap/tidb/issues/55791) @[cbcwestwolf](https://github.com/cbcwestwolf) **tw@lilin90** -新增字符集支持:TiDB v8.4 新增了对 GB18030 字符集的支持,这是一个广泛用于中文字符编码的标准,确保 TiDB 能够更好地处理中文相关的数据存储和查询需求。 + 从 v8.4.0 开始,TiDB 支持 `gb18030` 字符集,以确保 TiDB 能够更好地处理中文相关的数据存储和查询需求。该字符集是一个广泛用于中文字符编码的标准。 -新增排序规则:引入了 gb18030_bin 和 gb18030_general_ci 两种排序规则。gb18030_bin 提供了基于二进制的精准排序,而 gb18030_general_ci 则支持大小写不敏感的通用排序规则。这两种排序规则使得对 GB18030 编码文本的排序和比较更加灵活高效。 + 从 v8.4.0 开始,TiDB 支持 `gb18030_bin` 和 `gb18030_chinese_ci` 排序规则。`gb18030_bin` 提供了基于二进制的精准排序,而 `gb18030_chinese_ci` 则支持大小写不敏感的通用排序规则。这两种排序规则使得对 `gb18030` 编码文本的排序和比较更加灵活高效。 -通过支持 GB18030 字符集及其排序规则,TiDB v8.4 增强了与中文应用场景的兼容性,特别是在涉及多种语言和字符编码的场景下,用户能够更方便地进行字符集的选择和操作,提升了数据库的使用体验。 + 通过支持 `gb18030` 字符集及其排序规则,TiDB v8.4.0 增强了与中文应用场景的兼容性,特别是在涉及多种语言和字符编码的场景下,可以更方便地进行字符集的选择和操作,提升了数据库的使用体验。 - 更多信息,请参考[用户文档](链接)。 + 更多信息,请参考[用户文档](/character-set-gb18030.md)。 ### 数据库管理 From fbfb4ee088ac61ff8239d5b84a9bbcae006585b5 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 10:45:02 +0800 Subject: [PATCH 063/127] Update wording --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 820d5bccc176..da6b8f3486d2 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -46,7 +46,7 @@ TiDB 版本:8.4.0 - + From c87974e4c584757e357df41a0a9e8e9f6fb4d1dd Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 10:47:45 +0800 Subject: [PATCH 064/127] Apply suggestions from code review --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index da6b8f3486d2..a86413e0ee1b 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -46,7 +46,7 @@ TiDB 版本:8.4.0 - + From ff3e83dbcfdb1c82a6dee1a1e34abf833506f9a0 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 11:22:17 +0800 Subject: [PATCH 065/127] Remove inapplicable content --- releases/release-8.4.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index a86413e0ee1b..a640e75603bc 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -188,7 +188,6 @@ TiDB 版本:8.4.0 TiDB 在 v8.4.0 部分调整了资源分配策略,更好的满足客户对资源管控的预期。 - - 拥有 `BURSTABLE` 属性的资源组,超出 `RU_PER_SEC` 的资源请求会被控制在一定范围内,降低对其他资源组产生的影响。 - 控制大查询在运行时的资源分配,避免超出资源组限额。配合 Runaway Queries 的 `COOLDOWN` 动作,识别并降低大查询并发度,降低瞬时资源消耗。 - 调整默认的优先级调度策略。当不同优先级的任务同时运行时,高优先级的任务获得更多资源。 From 1d9629c35db19a947abf1fca457aeade4913d10e Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 14:34:38 +0800 Subject: [PATCH 066/127] Apply suggestions from code review --- releases/release-8.4.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index a640e75603bc..6bcd751d88cf 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -186,7 +186,7 @@ TiDB 版本:8.4.0 * 优化资源组资源分配策略 [#50831](https://github.com/pingcap/tidb/issues/50831) @[nolouch](https://github.com/nolouch) **tw@lilin90** - TiDB 在 v8.4.0 部分调整了资源分配策略,更好的满足客户对资源管控的预期。 + TiDB 在 v8.4.0 部分调整了资源分配策略,更好地满足用户对资源管控的预期。 - 控制大查询在运行时的资源分配,避免超出资源组限额。配合 Runaway Queries 的 `COOLDOWN` 动作,识别并降低大查询并发度,降低瞬时资源消耗。 - 调整默认的优先级调度策略。当不同优先级的任务同时运行时,高优先级的任务获得更多资源。 @@ -221,7 +221,7 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/vector-search-overview.md)。 -* TiDB 外键约束检查功能成为正式功能 (GA) [#55861](链接) @[GitHub ID-TBD](https://github.com/pingcap/tidb/issues/55861) **tw@lilin90** +* TiDB 外键约束检查成为正式功能 (GA) [#55861](https://github.com/pingcap/tidb/issues/55861) @[YangKeao](https://github.com/YangKeao) **tw@lilin90** 从 v6.6.0 开始,TiDB 支持通过系统变量 [`foreign_key_checks`](/system-variables.md#foreign_key_checks) 做外键约束检查,但一直为实验特性。v8.4.0 对外键特性在更多场景做了覆盖测试,提升了稳定性和性能,因此从 v8.4.0 开始,外键功能成为正式功能 (GA)。 @@ -370,7 +370,7 @@ TiDB 版本:8.4.0 - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** - 优化 BULK 模式 DML 的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制是否将优化器为 `estRows` 估算的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低并发大量写入引发的开销 [#issue号](链接) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** + - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低大量并发写入引发的开销 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** From 25b9e350e8967502744fd491c7825bd68fc2951d Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 14:42:04 +0800 Subject: [PATCH 067/127] Update a link --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 6bcd751d88cf..6789db2dac2e 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -136,7 +136,7 @@ TiDB 版本:8.4.0 通过开启配置项 `logical-import-prep-stmt`,TiDB Lightning 逻辑导入产生的 SQL 语句将通过 prepare 接口执行,可提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 - 更多信息,请参考[用户文档](tidb-lightning/tidb-lightning-configuration.md)。 + 更多信息,请参考[用户文档](/tidb-lightning/tidb-lightning-configuration.md)。 * 分区表的全局索引成为正式功能 (GA) [#45133](https://github.com/pingcap/tidb/issues/45133) @[mjonss](https://github.com/mjonss)@[Defined2014](https://github.com/Defined2014) **tw@hfxsd** # From f98fd2075d1a9d6e7bb23e596ad16b934959204e Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 14:53:25 +0800 Subject: [PATCH 068/127] Apply suggestions from code review --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 6789db2dac2e..a72b3a44cda8 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -128,11 +128,11 @@ TiDB 版本:8.4.0 - 消除冗余,在相同的内存消耗下缓存更多执行计划。 - 在实例上分配固定大小的内存区域,更有效地限制内存使用。 - 在 v8.4.0 中,实例级执行计划缓存仅支持对查询的执行计划进行缓存,默认关闭。你可以通过系统变量 [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入) 开启该功能,并通过系统变量 [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) 设置其最大内存使用量。开启该功能之前,请关闭关闭会话级别的 [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md) 和 [非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 + 在 v8.4.0 中,实例级执行计划缓存仅支持对查询的执行计划进行缓存,默认关闭。你可以通过系统变量 [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入) 开启该功能,并通过系统变量 [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) 设置其最大内存使用量。开启该功能之前,请关闭关闭会话级别的 [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md)和[非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 更多信息,请参考[用户文档](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)。 -* TiDB Lightning 的逻辑导入支持 prepare 接口 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) @[qw4990](https://github.com/qw4990) **tw@lilin90** +* TiDB Lightning 的逻辑导入支持 prepare 接口 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) **tw@lilin90** 通过开启配置项 `logical-import-prep-stmt`,TiDB Lightning 逻辑导入产生的 SQL 语句将通过 prepare 接口执行,可提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 From d55588f1eb204890dad542c37575edfa58c55677 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 14:55:21 +0800 Subject: [PATCH 069/127] Update format --- releases/release-8.4.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index a72b3a44cda8..6dda6789b34b 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -139,7 +139,6 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/tidb-lightning/tidb-lightning-configuration.md)。 * 分区表的全局索引成为正式功能 (GA) [#45133](https://github.com/pingcap/tidb/issues/45133) @[mjonss](https://github.com/mjonss)@[Defined2014](https://github.com/Defined2014) **tw@hfxsd** -# 之前版本的分区表,因为不支持全局索引有较多的限制,比如唯一键必须包含分区表达式中用到的所有列,如果查询条件不带分区键,查询时会扫描所有分区,导致性能较差。从 v7.6.0 开始,引入了系统变量 [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) 用于开启全局索引特性,但该功能当时处于开发中,不够完善,不建议开启。 从 v8.3.0 开始,全局索引作为实验特性正式发布。你可通过关键字 `GLOBAL` 为分区表显式创建一个全局索引,从而去除分区表唯一键必须包含分区表达式中用到的所有列的限制,满足灵活的业务需求。同时基于全局索引也提升了非分区列的查询性能。 From f34b285ed8f1cca819362cfbf475e97363b4f465 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 25 Sep 2024 15:00:25 +0800 Subject: [PATCH 070/127] Apply suggestions from code review --- releases/release-8.4.0.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 6dda6789b34b..0d4fd077bbf0 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -80,8 +80,8 @@ TiDB 版本:8.4.0 - - + +
可扩展性和性能 执行计划缓存在实例内共享(实验特性) 执行计划缓存在实例内共享(实验特性) 实例级执行计划缓存支持在内存中缓存更多的执行计划,消除 SQL 编译时所消耗的时间,从而减少 SQL 的运行时间,提升 OLTP 系统的性能和吞吐。同时,也能更好的控制内存占用,提升数据库稳定性。
分区表全局索引成为正式功能分区表全局索引成为正式功能 全局索引可以有效提高检索非分区列的效率,并且消除了唯一键必须包含分区键的限制。该功能扩展了 TiDB 分区表的使用场景,避免了数据迁移过程中的一些应用修改工作。
TiDB 并行获取 TSO TiDB 并行获取 TSO 在高并发场景下,并行获取 TSO 能够有效降低等待获取 TSO 的时间,提升集群的吞吐。
提升管理类 SQL 的执行效率 提升管理类 SQL 的执行效率 在一部分 SaaS 系统中,存在批量创建大量用户,以及定期轮换所有用户密码的需求。TiDB 提升了创建和修改数据库用户的性能,保证操作能在期望的时间窗口。
缓存表的查询性能提升 缓存表的查询性能提升 优化了缓存表的查询性能,提升幅度最高可达5.4倍。在需要对小表进行高速查询的场景下,整体性能得到提升。
稳定性与高可用 Runaway Queries 支持更多触发条件,并能够切换资源组 Runaway Queries 支持更多触发条件,并能够切换资源组 Runaway Queries 为用户提供了有效的手段,降低突发的 SQL 性能问题对系统产生的影响。新版本中新增处理行数Request Unit 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。
支持为后台任务设置资源使用上限 支持为后台任务设置资源使用上限 为后台任务设置百分比上线,针对不同业务系统的需求控制后台任务的消耗,可以按需将后台任务的消耗限制在一个很低的水平,保证在线业务的服务质量。
TiProxy 流量捕捉和回放 TiProxy 流量捕捉和回放 在做集群升级、迁移、部署变化等重要变更之前,通过捕捉真实负载来验证目标集群的性能,确保变更的成功。
统计信息收集自适应并发度 统计信息收集自适应并发度 自动统计信息收集会根据节点规模和硬件规格自动决定采集并发度,提升统计信息收集效率,减少手工调优,保证集群性能稳定。
SQL 外键成为正式功能 外键成为正式功能 支持 MySQL 兼容的外键约束,维护数据一致性,进一步提升了 TiDB 对 MySQL 的兼容能力。
向量搜索功能(实验特性) 向量搜索功能(实验特性) 加速向量搜索的性能,适用于检索增强生成(RAG)、语义搜索、推荐系统等应用类型。把 TiDB 应用场景扩展到 AI 和 大语言模型(LLM)领域。
数据库管理和可观测性 持久化内存表到 Workload Repository(实验特性) 持久化内存表到 Workload Repository(实验特性) 持久化内存表中的运行指标和状态信息,是观测性的重要增强,能极大提升过往问题诊断和追溯的效率,并为未来的自动化运维,提供了数据集支持。 围绕 Workload Repository 构建报告、诊断、推荐一体化的能力,会成为未来提升 TiDB 易用性的重要组成。
在内存表中显示 TiKV 和 TiDB 的 CPU 时间 在内存表中显示 TiKV 和 TiDB 的 CPU 时间 将 CPU 时间合入系统表中展示,与会话或 SQL 的其他指标并列,方便用户从多角度对高 CPU 消耗的操作进行观测,提升诊断效率。尤其适用于诊断实例 CPU 飙升或集群读写热点等场景。
支持对开启了 IMDSv2 服务的 TiKV 实例做备份 支持对开启了 IMDSv2 服务的 TiKV 实例做备份 IMDSv2 目前是 AWS EC2 的默认元数据服务。TiDB 支持从开启了 IMDSv2 的 TiKV 实例中备份数据,协助客户更好地在公有云服务中运行 TiDB 集群。
安全 备份数据加密成为正式功能 备份数据加密成为正式功能 加密数据库备份是一种增强数据安全性的重要措施,既可以保护数据备份中敏感信息,又有助于合规,确保数据在存储和传输中的安全。
缓存表的查询性能提升优化了缓存表的查询性能,提升幅度最高可达5.4倍。在需要对小表进行高速查询的场景下,整体性能得到提升。优化了缓存表索引扫描的查询性能,部分场景可提升5倍。在需要对小表进行高速查询的场景下,利用缓存表可大幅提升整体性能。
稳定性与高可用
缓存表的查询性能提升优化了缓存表索引扫描的查询性能,部分场景可提升5倍。在需要对小表进行高速查询的场景下,利用缓存表可大幅提升整体性能。优化了缓存表索引扫描的查询性能,部分场景可提升 5.4 倍。在需要对小表进行高速查询的场景下,利用缓存表可大幅提升整体性能。
稳定性与高可用 Runaway Queries 支持更多触发条件,并能够切换资源组Runaway Queries 为用户提供了有效的手段,降低突发的 SQL 性能问题对系统产生的影响。新版本中新增处理行数Request Unit 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。Runaway Queries 为用户提供了有效的手段,降低突发的 SQL 性能问题对系统产生的影响。新版本中新增 Coprocessor 处理的 Key 的数量Request Unit 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。
支持为后台任务设置资源使用上限为后台任务设置百分比上线,针对不同业务系统的需求控制后台任务的消耗,可以按需将后台任务的消耗限制在一个很低的水平,保证在线业务的服务质量。 支持为资源管控的后台任务设置资源使用上限为资源管控的后台任务设置百分比上限,针对不同业务系统的需求,控制后台任务的消耗,从而将后台任务的消耗限制在一个很低的水平,保证在线业务的服务质量。
TiProxy 流量捕捉和回放
在内存表中显示 TiKV 和 TiDB 的 CPU 时间将 CPU 时间合入系统表中展示,与会话或 SQL 的其他指标并列,方便用户从多角度对高 CPU 消耗的操作进行观测,提升诊断效率。尤其适用于诊断实例 CPU 飙升或集群读写热点等场景。将 CPU 时间合入系统表中展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测,提升诊断效率。尤其适用于诊断实例 CPU 飙升或集群读写热点等场景。
支持对开启了 IMDSv2 服务的 TiKV 实例做备份IMDSv2 目前是 AWS EC2 的默认元数据服务。TiDB 支持从开启了 IMDSv2 的 TiKV 实例中备份数据,协助客户更好地在公有云服务中运行 TiDB 集群。目前 AWS EC2 的默认元数据服务是 IMDSv2。TiDB 支持从开启了 IMDSv2 的 TiKV 实例中备份数据,协助你更好地在公有云服务中运行 TiDB 集群。
安全为资源管控的后台任务设置百分比上限,针对不同业务系统的需求,控制后台任务的消耗,从而将后台任务的消耗限制在一个很低的水平,保证在线业务的服务质量。
TiProxy 流量捕捉和回放在做集群升级、迁移、部署变化等重要变更之前,通过捕捉真实负载来验证目标集群的性能,确保变更的成功。TiProxy 流量捕获和回放在进行集群升级、迁移或部署变更等重要操作之前,使用 TiProxy 捕获 TiDB 生产集群的真实负载,并在测试的目标集群中重现该工作负载,从而验证性能,确保变更成功。
统计信息收集自适应并发度
稳定性与高可用 Runaway Queries 支持更多触发条件,并能够切换资源组Runaway Queries 为用户提供了有效的手段,降低突发的 SQL 性能问题对系统产生的影响。新版本中新增 Coprocessor 处理的 Key 的数量Request Unit 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。 Runaway Queries 支持更多触发条件,并能够切换资源组Runaway Queries 为用户提供了有效的手段,降低突发的 SQL 性能问题对系统产生的影响。新版本中新增 Coprocessor 处理的 Key 的数量 (PROCESSED_KEYS) 和 Request Unit (RU) 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。
支持为资源管控的后台任务设置资源使用上限在一部分 SaaS 系统中,存在批量创建大量用户,以及定期轮换所有用户密码的需求。TiDB 提升了创建和修改数据库用户的性能,保证操作能在期望的时间窗口。
缓存表的查询性能提升 提升缓存表的查询性能 优化了缓存表索引扫描的查询性能,部分场景可提升 5.4 倍。在需要对小表进行高速查询的场景下,利用缓存表可大幅提升整体性能。
稳定性与高可用 Runaway Queries 支持更多触发条件,并能够切换资源组Runaway Queries 支持更多触发条件,并能够切换资源组 Runaway Queries 为用户提供了有效的手段,降低突发的 SQL 性能问题对系统产生的影响。新版本中新增 Coprocessor 处理的 Key 的数量 (PROCESSED_KEYS) 和 Request Unit (RU) 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。
支持为资源管控的后台任务设置资源使用上限支持为资源管控的后台任务设置资源使用上限 为资源管控的后台任务设置百分比上限,针对不同业务系统的需求,控制后台任务的消耗,从而将后台任务的消耗限制在一个很低的水平,保证在线业务的服务质量。
SQL 外键成为正式功能外键成为正式功能 支持 MySQL 兼容的外键约束,维护数据一致性,进一步提升了 TiDB 对 MySQL 的兼容能力。
数据库管理和可观测性 持久化内存表到 Workload Repository(实验特性) 持久化内存表中的运行指标和状态信息,是观测性的重要增强,能极大提升过往问题诊断和追溯的效率,并为未来的自动化运维,提供了数据集支持。 围绕 Workload Repository 构建报告、诊断、推荐一体化的能力,会成为未来提升 TiDB 易用性的重要组成。持久化内存表到 Workload Repository(实验特性)持久化内存表中的运行指标和状态信息,是观测性的重要增强,能极大提升过往问题诊断和追溯的效率,并为未来的自动化运维,提供了数据集支持。 围绕 Workload Repository 构建报告、诊断、推荐一体化的能力,会成为未来提升 TiDB 易用性的重要组成。
在内存表中显示 TiKV 和 TiDB 的 CPU 时间
可扩展性和性能 执行计划缓存在实例内共享(实验特性) 实例级执行计划缓存支持在内存中缓存更多的执行计划,消除 SQL 编译时所消耗的时间,从而减少 SQL 的运行时间,提升 OLTP 系统的性能和吞吐。同时,也能更好的控制内存占用,提升数据库稳定性。实例级执行计划缓存(实验特性)实例级执行计划缓存允许同一个 TiDB 实例的所有会话共享执行计划缓存,通过在内存中缓存更多执行计划,消除 SQL 编译时间,从而减少 SQL 运行时间,提升 OLTP 系统的性能和吞吐,同时更好地控制内存使用,提升数据库稳定性。
分区表全局索引成为正式功能在进行集群升级、迁移或部署变更等重要操作之前,使用 TiProxy 捕获 TiDB 生产集群的真实负载,并在测试的目标集群中重现该工作负载,从而验证性能,确保变更成功。
统计信息收集自适应并发度自动统计信息收集会根据节点规模和硬件规格自动决定采集并发度,提升统计信息收集效率,减少手工调优,保证集群性能稳定。统计信息收集自适应并发度自动统计信息收集会根据节点规模和硬件规格自动确定收集并发度,提高统计信息收集效率,减少手动调优,确保集群性能稳定。
SQL加速向量搜索的性能,适用于检索增强生成(RAG)、语义搜索、推荐系统等应用类型。把 TiDB 应用场景扩展到 AI 和 大语言模型(LLM)领域。
数据库管理和可观测性持久化内存表到 Workload Repository(实验特性)持久化内存表中的运行指标和状态信息,是观测性的重要增强,能极大提升过往问题诊断和追溯的效率,并为未来的自动化运维,提供了数据集支持。 围绕 Workload Repository 构建报告、诊断、推荐一体化的能力,会成为未来提升 TiDB 易用性的重要组成。
数据库管理和可观测性 在内存表中显示 TiKV 和 TiDB 的 CPU 时间 将 CPU 时间合入系统表中展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测,提升诊断效率。尤其适用于诊断实例 CPU 飙升或集群读写热点等场景。
稳定性与高可用 Runaway Queries 支持更多触发条件,并能够切换资源组Runaway Queries 为用户提供了有效的手段,降低突发的 SQL 性能问题对系统产生的影响。新版本中新增 Coprocessor 处理的 Key 的数量 (PROCESSED_KEYS) 和 Request Unit (RU) 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。Runaway Queries 提供了有效的手段来降低突发的 SQL 性能问题对系统产生的影响。新版本中新增 Coprocessor 处理的 Key 的数量 (PROCESSED_KEYS) 和 Request Unit (RU) 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。
支持为资源管控的后台任务设置资源使用上限
稳定性与高可用 Runaway Queries 支持更多触发条件,并能够切换资源组Runaway Queries 提供了有效的手段来降低突发的 SQL 性能问题对系统产生的影响。新版本中新增 Coprocessor 处理的 Key 的数量 (PROCESSED_KEYS) 和 Request Unit (RU) 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。Runaway Queries 提供了有效的手段来降低突发的 SQL 性能问题对系统产生的影响。v8.4.0 中新增 Coprocessor 处理的 Key 的数量 (PROCESSED_KEYS) 和 Request Unit (RU) 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。
支持为资源管控的后台任务设置资源使用上限
安全 备份数据加密成为正式功能 加密数据库备份是一种增强数据安全性的重要措施,既可以保护数据备份中敏感信息,又有助于合规,确保数据在存储和传输中的安全。 日志备份数据支持客户端加密(实验特性) 在上传日志备份到备份存储之前,你可以对日志备份数据进行加密,确保数据在存储和传输过程中的安全性。
@@ -238,11 +238,15 @@ TiDB 版本:8.4.0 ### 数据库管理 -* PITR adds client-side log backup data encryption support (experimental) [#55834](https://github.com/pingcap/tidb/issues/55834) @[Tristan1900](https://github.com/Tristan1900) **tw@qiancai** +* 日志备份数据支持客户端加密(实验特性)[#55834](https://github.com/pingcap/tidb/issues/55834) @[Tristan1900](https://github.com/Tristan1900) **tw@qiancai** - Previously only the data from a snapshot based backup could be encrypted (on the client side) with a data key provided by the user. With this feature, log backups may now also be encrypted, ensuring that the confidentiality of information within the backup data is secured. + 在之前的版本中,仅快照备份数据支持客户端加密。从 v8.4.0 起,日志备份数据也支持客户端加密。在上传日志备份到备份存储之前,你可以选择以下方式之一对日志备份数据进行加密,从而提高备份数据的安全性: + + - 使用自定义的固定密钥加密 + - 使用本地磁盘的主密钥加密 + - 使用 KMS(密钥管理服务)的主密钥加密 - For more information, see [documentation](doc-link). + 更多信息,请参考[用户文档](/br/br-pitr-manual.md#加密日志备份数据)。 * BR reduces requires storage permissions for restores [#55870](https://github.com/pingcap/tidb/issues/55870) @[Leavrth](https://github.com/Leavrth) **tw@Oreoxmt** @@ -390,8 +394,7 @@ TiDB 版本:8.4.0 + Backup & Restore (BR) - - 集群恢复时同时设置 `split-table=false` 和 `split-region-on-table=false`,优化 region 的分配策略 [#53532](https://github.com/pingcap/tidb/issues/53532) @[Leavrth](https://github.com/Leavrth) - **tw@qiancai** + - 当集群的 `split-table` 和 `split-region-on-table` 配置项为默认值 `false` 时,BR 在恢复数据到该集群的过程中不会按照 table 分裂 Region,以提升恢复速度 [#53532](https://github.com/pingcap/tidb/issues/53532) @[Leavrth](https://github.com/Leavrth) **tw@qiancai** - 默认不支持使用 SQL 语句 `RESTORE` 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + TiCDC From 3fca8878d56081de843752540f146daf7ddcf02c Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 15:09:24 +0800 Subject: [PATCH 071/127] Improve description --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 0d4fd077bbf0..b1eacb1ae634 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -132,9 +132,9 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)。 -* TiDB Lightning 的逻辑导入支持 prepare 接口 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) **tw@lilin90** +* TiDB Lightning 的逻辑导入支持预处理语句和客户端语句缓存 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) **tw@lilin90** - 通过开启配置项 `logical-import-prep-stmt`,TiDB Lightning 逻辑导入产生的 SQL 语句将通过 prepare 接口执行,可提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 + 通过开启配置项 `logical-import-prep-stmt`,TiDB Lightning 逻辑导入产生的 SQL 语句将通过使用预处理语句和客户端语句缓存,降低 TiDB SQL 解析和编译的成本,提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 更多信息,请参考[用户文档](/tidb-lightning/tidb-lightning-configuration.md)。 From 5a2afb9983c92ecf1300428082b256f28c5be762 Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:25:37 +0800 Subject: [PATCH 072/127] Update releases/release-8.4.0.md Co-authored-by: Grace Cai --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index b1eacb1ae634..c8e0b874d6ae 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -67,7 +67,7 @@ TiDB 版本:8.4.0 向量搜索功能(实验特性) - 加速向量搜索的性能,适用于检索增强生成(RAG)、语义搜索、推荐系统等应用类型。把 TiDB 应用场景扩展到 AI 和 大语言模型(LLM)领域。 + 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 数据库管理和可观测性 From 72febaf463f256ecc08e291d324505649201f30f Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:26:05 +0800 Subject: [PATCH 073/127] Update releases/release-8.4.0.md Co-authored-by: Grace Cai --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index c8e0b874d6ae..2f09ac16e4bc 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -104,9 +104,9 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入)。 -* 优化 TiDB 的 Hash Join 算子实现效率(实验特性) [#55153](https://github.com/pingcap/tidb/issues/55153) [#53127](https://github.com/pingcap/tidb/issues/53127) @[windtalker](https://github.com/windtalker) @[xzhangxian1008](https://github.com/xzhangxian1008) @[XuHuaiyu](https://github.com/XuHuaiyu) @[wshwsh12](https://github.com/wshwsh12) **tw@qiancai** +* 优化 TiDB Hash Join 算子的执行效率(实验特性) [#55153](https://github.com/pingcap/tidb/issues/55153) [#53127](https://github.com/pingcap/tidb/issues/53127) @[windtalker](https://github.com/windtalker) @[xzhangxian1008](https://github.com/xzhangxian1008) @[XuHuaiyu](https://github.com/XuHuaiyu) @[wshwsh12](https://github.com/wshwsh12) **tw@qiancai** - 在 v8.4.0 版本之前,TiDB 的 Hash Join 算子实现效率不高。从 v8.4.0 开始,TiDB 将对 Hash Join 算子进行重构优化,提升执行效率。在 v8.4.0 版本,该功能为实验特性,只有 INNER JOIN 和 OUTER JOIN 可以使用重构后的高性能 Hash Join 算子。当该功能启用时,执行器会根据高性能 Hash Join 算子对关联操作的支持情况,自动选择是否使用高性能 Hash Join 算子。你可以通过 [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) 变量控制是否启用高性能 Hash Join 算子。 + 在 v8.4.0 中,TiDB 对 Hash Join 算子的实现方法进行了优化,以提升其执行效率。目前,优化后的 Hash Join 实现方法为实验特性,仅对 Inner Join 和 Outer Join 类型的 Hash Join 生效,且默认关闭。你可以将变量 [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) 设置为 `optimized` 开启该优化实现方法。开启后,TiDB 在执行 Inner Join 和 Outer Join 类型的 Hash Join 时,将使用优化后的实现方法。 更多信息,请参考[用户文档](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入)。 From d954bf96c7d71b7140963ddcc0f5c019ea849640 Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:26:25 +0800 Subject: [PATCH 074/127] Update releases/release-8.4.0.md Co-authored-by: Grace Cai --- releases/release-8.4.0.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 2f09ac16e4bc..a07a321a7df3 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -211,12 +211,13 @@ TiDB 版本:8.4.0 * 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) **tw@qiancai** - 向量搜索是一种基于数据语义的搜索方法,旨在提供更相关的搜索结果,是 AI 和大语言模型(LLM)的关键功能之一。通过使用向量索引,数据库能够加速向量搜索的性能,快速基于不同的距离函数查询相似向量,从而支持检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种应用场景。 - - 从 v8.4 版本开始,TiDB 支持向量数据类型和向量索引,具备强大的向量搜索能力。TiDB 的向量数据类型最多可支持 16383 维度,并提供多种距离函数支持,包括 L2 距离(欧式距离)、余弦距离、负内积和 L1 距离(曼哈顿距离)。 - - 在使用时,用户只需创建包含向量类型的表并插入数据,即可执行向量搜索查询,也可进行向量数据与传统关系数据的混合查询。 - 值得注意的是,TiDB 的向量索引依赖于 TiFlash,因此,在使用向量索引之前,需要确保 TiDB 集群中已添加 TiFlash 节点。 + 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 + + 从 v8.4.0 开始,TiDB 支持[向量数据类型](vector-search-data-types.md)和[向量搜索索引](vector-search-index.md),具备强大的向量搜索能力。TiDB 的向量数据类型最多可支持 16383 维度,并支持多种[距离函数](/vector-search-functions-and-operators.md#向量函数),包括 L2 距离(欧式距离)、余弦距离、负内积和 L1 距离(曼哈顿距离)。 + + 在使用时,你只需要创建包含向量数据类型的表,并插入向量数据,即可执行向量搜索查询,也可进行向量数据与传统关系数据的混合查询。此外,你可以创建并利用向量搜索索引来提升向量搜索的性能。 + + 需要注意的是,TiDB 的向量搜索索引依赖于 TiFlash。因此,在使用向量搜索索引之前,需要确保 TiDB 集群中已部署 TiFlash 节点。 更多信息,请参考[用户文档](/vector-search-overview.md)。 From 8dfac1d0d96e4916ffc3f62b8aa5b48b888906f4 Mon Sep 17 00:00:00 2001 From: joey-yez <104608045+joey-yez@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:26:45 +0800 Subject: [PATCH 075/127] Update releases/release-8.4.0.md Co-authored-by: Grace Cai --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index a07a321a7df3..1d8e2e787dc5 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -372,7 +372,7 @@ TiDB 版本:8.4.0 + TiDB - 优化扫描大量数据时构造 BatchCop Task 的效率 [#55915](https://github.com/pingcap/tidb/issues/55915) [#55413](https://github.com/pingcap/tidb/issues/55413) @[wshwsh12](https://github.com/wshwsh12) **tw@caiqian** - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** - - 优化 BULK 模式 DML 的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** + - 优化系统变量 `tidb_dml_type` 为 `"bulk"` 时 DML 语句的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制是否将优化器为 `estRows` 估算的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低大量并发写入引发的开销 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@Oreoxmt** From b31b74edb0445979a9ec347d4ae7407415402a74 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 25 Sep 2024 15:28:14 +0800 Subject: [PATCH 076/127] update BR reduces storage permission for restores, TiCDC Claim-Check, and TiCDC Checksum V2 Signed-off-by: Aolin --- releases/release-8.4.0.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 1d8e2e787dc5..ed88f7e62ff4 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -249,11 +249,11 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/br/br-pitr-manual.md#加密日志备份数据)。 -* BR reduces requires storage permissions for restores [#55870](https://github.com/pingcap/tidb/issues/55870) @[Leavrth](https://github.com/Leavrth) **tw@Oreoxmt** +* BR 降低了从云存储服务系统恢复数据的权限要求 [#55870](https://github.com/pingcap/tidb/issues/55870) @[Leavrth](https://github.com/Leavrth) **tw@Oreoxmt** - Previously, when BR was restoring data, checkpoint information about the progress of the restore was recorded in the location hosting the backup data. These restore checkpoints enabled restoration to be quickly resumed if it was interrupted. With this feature, the restore checkpoints are now stored in the target TiDB cluster. This means that BR only requires read access to the backup dataset location for restores. + 在 v8.4.0 之前,BR 在恢复过程中将恢复进度的检查点信息存储在备份数据位置。这些检查点使中断的恢复操作能够快速恢复。从 v8.4.0 开始,BR 将恢复检查点信息存储在目标 TiDB 集群中。这意味着 BR 在恢复时只需要对备份目录的读取权限。 - For more information, see [documentation](doc-link). + 更多信息,请参考[用户文档](/br/backup-and-restore-storages.md#鉴权)。 ### 可观测性 @@ -285,17 +285,19 @@ TiDB 版本:8.4.0 ### 数据迁移 -* TiCDC claim check nows supports raw value format [#11396](https://github.com/pingcap/tiflow/issues/11396) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** +* TiCDC Claim-Check 支持仅发送Kafka 消息的 `value` 部分到外部存储 [#11396](https://github.com/pingcap/tiflow/issues/11396) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** + + 在 v8.4.0 之前,使用 Claim-Check 功能处理大型消息时(将 `large-message-handle-option` 设置为 `claim-check`),TiCDC 会将 `key` 和 `value` 都编码并存储在外部存储系统中。 - When TiCDC used the claim check capability to handle large messages it included both the Key and the Value are encoded and stored in the external storage system. With the new raw value option, TiCDC can now be configured to store the value format only in the external storage system, using the protocol encoding. + 从 v8.4.0 开始,TiCDC 支持仅将 Kafka 消息的 `value` 部分发送到外部存储,该功能仅适用于非 Open Protocol 协议。你可以通过设置 `claim-check-raw-value` 参数控制是否开启该功能。 - For more information, see [documentation](ticdc-sink-to-kafka.md#send-large-messages-to-external-storage). + 更多信息,请参考[用户文档](/ticdc/ticdc-sink-to-kafka.md#只发送-value-部分到外部存储)。 -* TiCDC introduces new row checksum to verify old values after Add and Drop Column operations [#10969](https://github.com/pingcap/tiflow/issues/10969) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** +* TiCDC 引入 Checksum V2 算法校验 Update 或 Delete 事件中 Old Value 数据 [#10969](https://github.com/pingcap/tiflow/issues/10969) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** - Starting from v8.4.0, TiDB and TiCDC introduce Checksum V2 to address issues with Checksum V1 in verifying old values in Update or Delete events after Add Column or Drop Column operations. For new clusters created in v8.4.0 or later, or clusters upgraded to v8.4.0, TiDB uses Checksum V2 by default when single-row data checksum verification is enabled. TiCDC supports handling both Checksum V1 and V2. This change only affects TiDB and TiCDC internal implementation and does not impact checksum calculation methods for downstream Kafka consumers. + 从 v8.4.0 开始,TiDB 和 TiCDC 引入 Checksum V2 算法,解决了 Checksum V1 在执行 Add Column 或 Drop Column 后无法正确校验 Update 或 Delete 事件中 Old Value 数据的问题。对于 v8.4.0 及之后新创建的集群,或从之前版本升级到 v8.4.0 的集群,启用单行数据 Checksum 正确性校验功能后,TiDB 默认使用 Checksum V2 算法进行 Checksum 计算和校验。TiCDC 支持同时处理 V1 和 V2 两种 Checksum。该变更仅影响 TiDB 和 TiCDC 内部实现,不影响下游 Kafka consumer 的 Checksum 计算校验方法。 - For more information, see [documentation](/ticdc-integrity-check.md). + 更多信息,请参考[用户文档](/ticdc/ticdc-integrity-check.md)。 ## 兼容性变更 From 37a5d0447e21f872170cb727f4758ce641dea017 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 25 Sep 2024 15:58:04 +0800 Subject: [PATCH 077/127] add link for highlights Signed-off-by: Aolin --- releases/release-8.4.0.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index ed88f7e62ff4..2986214bd12c 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -24,7 +24,7 @@ TiDB 版本:8.4.0 可扩展性和性能 - 实例级执行计划缓存(实验特性) + 实例级执行计划缓存(实验特性) 实例级执行计划缓存允许同一个 TiDB 实例的所有会话共享执行计划缓存,通过在内存中缓存更多执行计划,消除 SQL 编译时间,从而减少 SQL 运行时间,提升 OLTP 系统的性能和吞吐,同时更好地控制内存使用,提升数据库稳定性。 @@ -53,11 +53,11 @@ TiDB 版本:8.4.0 为资源管控的后台任务设置百分比上限,针对不同业务系统的需求,控制后台任务的消耗,从而将后台任务的消耗限制在一个很低的水平,保证在线业务的服务质量。 - TiProxy 流量捕获和回放 + TiProxy 流量捕获和回放(实验特性) 在进行集群升级、迁移或部署变更等重要操作之前,使用 TiProxy 捕获 TiDB 生产集群的真实负载,并在测试的目标集群中重现该工作负载,从而验证性能,确保变更成功。 - 统计信息收集自适应并发度 + 统计信息收集自适应并发度 自动统计信息收集会根据节点规模和硬件规格自动确定收集并发度,提高统计信息收集效率,减少手动调优,确保集群性能稳定。 @@ -381,6 +381,7 @@ TiDB 版本:8.4.0 - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + + TiKV - Region 的默认值由 96 MiB 提升到 256 MiB,避免 Region 数量过多导致额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** From e104b0f8fece5e719b2e9cf4eb4b54a57283b413 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 25 Sep 2024 15:58:37 +0800 Subject: [PATCH 078/127] Update releases/release-8.4.0.md --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 2986214bd12c..029a3213214d 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -390,7 +390,7 @@ TiDB 版本:8.4.0 + PD - - `Lightning` 导入过程中,允许 PD 做 `evict-leader` 调度来避免阻断 TiKV 的 offline 进程 [#issue号](链接) @[okJiang](https://github.com/okJiang) **tw@qiancai** + - 支持 TiKV 节点在 TiDB Lightning 导入数据期间优雅下线 (graceful offline) [#7853](https://github.com/tikv/pd/issues/7853) @[okJiang](https://github.com/okJiang) **tw@qiancai** + TiFlash From b7a4bbafe15e04bbf801799e9c27ffba4f16ce92 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Wed, 25 Sep 2024 16:03:10 +0800 Subject: [PATCH 079/127] Apply suggestions from code review --- releases/release-8.4.0.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 029a3213214d..af59a5d3e1b4 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -138,12 +138,13 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/tidb-lightning/tidb-lightning-configuration.md)。 -* 分区表的全局索引成为正式功能 (GA) [#45133](https://github.com/pingcap/tidb/issues/45133) @[mjonss](https://github.com/mjonss)@[Defined2014](https://github.com/Defined2014) **tw@hfxsd** +* 分区表的全局索引成为正式功能 (GA) [#45133](https://github.com/pingcap/tidb/issues/45133) @[mjonss](https://github.com/mjonss) @[Defined2014](https://github.com/Defined2014) @[jiyfhust](https://github.com/jiyfhust) @[L-maple](https://github.com/L-maple) **tw@hfxsd** + 之前版本的分区表,因为不支持全局索引有较多的限制,比如唯一键必须包含分区表达式中用到的所有列,如果查询条件不带分区键,查询时会扫描所有分区,导致性能较差。从 v7.6.0 开始,引入了系统变量 [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) 用于开启全局索引特性,但该功能当时处于开发中,不够完善,不建议开启。 从 v8.3.0 开始,全局索引作为实验特性正式发布。你可通过关键字 `GLOBAL` 为分区表显式创建一个全局索引,从而去除分区表唯一键必须包含分区表达式中用到的所有列的限制,满足灵活的业务需求。同时基于全局索引也提升了非分区列的查询性能。 - 在 v8.4.0 中,全局索引成为正式功能 (GA)。你无需再设置系统变量 [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) 开启全局索引特性,可以直接使用关键字 `GLOBAL` 创建全局索引。 + 在 v8.4.0 中,全局索引成为正式功能 (GA)。你无需再设置系统变量 [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) 开启全局索引特性,可以直接使用关键字 `GLOBAL` 创建全局索引。从 v8.4.0 开始,该系统变量被废弃,并总是设置为 `ON`。 更多信息,请参考[用户文档](/partitioned-table.md#全局索引)。 From b26669eaa723cad1ce1fc0c6f9742bc67083e509 Mon Sep 17 00:00:00 2001 From: Aolin Date: Wed, 25 Sep 2024 16:28:13 +0800 Subject: [PATCH 080/127] fix HTML table Signed-off-by: Aolin --- releases/release-8.4.0.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index af59a5d3e1b4..db9667249f76 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -24,64 +24,64 @@ TiDB 版本:8.4.0 可扩展性和性能 - 实例级执行计划缓存(实验特性) + 实例级执行计划缓存(实验特性)**tw@Oreoxmt 1569** 实例级执行计划缓存允许同一个 TiDB 实例的所有会话共享执行计划缓存,通过在内存中缓存更多执行计划,消除 SQL 编译时间,从而减少 SQL 运行时间,提升 OLTP 系统的性能和吞吐,同时更好地控制内存使用,提升数据库稳定性。 - 分区表全局索引成为正式功能 + 分区表全局索引成为正式功能**tw@hfxsd 1961** 全局索引可以有效提高检索非分区列的效率,并且消除了唯一键必须包含分区键的限制。该功能扩展了 TiDB 分区表的使用场景,避免了数据迁移过程中的一些应用修改工作。 - TiDB 并行获取 TSO + TiDB 并行获取 TSO**tw@qiancai 1893** 在高并发场景下,并行获取 TSO 能够有效降低等待获取 TSO 的时间,提升集群的吞吐。 - 提升管理类 SQL 的执行效率 + 提升管理类 SQL 的执行效率**tw@hfxsd 1941** 在一部分 SaaS 系统中,存在批量创建大量用户,以及定期轮换所有用户密码的需求。TiDB 提升了创建和修改数据库用户的性能,保证操作能在期望的时间窗口。 - 提升缓存表的查询性能 + 提升缓存表的查询性能**tw@hfxsd 1965** 优化了缓存表索引扫描的查询性能,部分场景可提升 5.4 倍。在需要对小表进行高速查询的场景下,利用缓存表可大幅提升整体性能。 稳定性与高可用 - Runaway Queries 支持更多触发条件,并能够切换资源组 + Runaway Queries 支持更多触发条件,并能够切换资源组**tw@hfxsd 1832 tw@lilin90 1800** Runaway Queries 提供了有效的手段来降低突发的 SQL 性能问题对系统产生的影响。v8.4.0 中新增 Coprocessor 处理的 Key 的数量 (PROCESSED_KEYS) 和 Request Unit (RU) 作为识别条件,并可以将识别到的查询置入指定资源组,对 Runaway Queries 做更精确的识别与控制。 - 支持为资源管控的后台任务设置资源使用上限 + 支持为资源管控的后台任务设置资源使用上限**tw@hfxsd 1909** 为资源管控的后台任务设置百分比上限,针对不同业务系统的需求,控制后台任务的消耗,从而将后台任务的消耗限制在一个很低的水平,保证在线业务的服务质量。 - TiProxy 流量捕获和回放(实验特性) + TiProxy 流量捕获和回放(实验特性)**tw@Oreoxmt 1942** 在进行集群升级、迁移或部署变更等重要操作之前,使用 TiProxy 捕获 TiDB 生产集群的真实负载,并在测试的目标集群中重现该工作负载,从而验证性能,确保变更成功。 - 统计信息收集自适应并发度 + 统计信息收集自适应并发度**tw@Oreoxmt 1739** 自动统计信息收集会根据节点规模和硬件规格自动确定收集并发度,提高统计信息收集效率,减少手动调优,确保集群性能稳定。 SQL - 外键成为正式功能 + 外键成为正式功能**tw@lilin90 1894** 支持 MySQL 兼容的外键约束,维护数据一致性,进一步提升了 TiDB 对 MySQL 的兼容能力。 - 向量搜索功能(实验特性) + 向量搜索功能(实验特性)**tw@qiancai 1898** 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 数据库管理和可观测性 - 在内存表中显示 TiKV 和 TiDB 的 CPU 时间 + 在内存表中显示 TiKV 和 TiDB 的 CPU 时间**tw@hfxsd 1877** 将 CPU 时间合入系统表中展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测,提升诊断效率。尤其适用于诊断实例 CPU 飙升或集群读写热点等场景。 - 支持对开启了 IMDSv2 服务的 TiKV 实例做备份 + 支持对开启了 IMDSv2 服务的 TiKV 实例做备份**tw@hfxsd 1945** 目前 AWS EC2 的默认元数据服务是 IMDSv2。TiDB 支持从开启了 IMDSv2 的 TiKV 实例中备份数据,协助你更好地在公有云服务中运行 TiDB 集群。 安全 - 日志备份数据支持客户端加密(实验特性) - 在上传日志备份到备份存储之前,你可以对日志备份数据进行加密,确保数据在存储和传输过程中的安全性。 + 日志备份数据支持客户端加密(实验特性)**tw@qiancai 1920** + 在上传日志备份到备份存储之前,你可以对日志备份数据进行加密,确保数据在存储和传输过程中的安全性。 From 6fe5c34e959496e788d51d53d507c8daf0bf7ea9 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Wed, 25 Sep 2024 16:29:10 +0800 Subject: [PATCH 081/127] Update capitalization --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index db9667249f76..e2b864749003 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -270,9 +270,9 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/information-schema/information-schema-processlist.md)和[用户文档](information-schema/information-schema-slow-query.md)。 -* TOP SQL 支持按表或数据库维度查看聚合结果 [#55540](https://github.com/pingcap/tidb/issues/55540) @[nolouch](https://github.com/nolouch) **tw@lilin90** +* Top SQL 支持按表或数据库维度查看聚合结果 [#55540](https://github.com/pingcap/tidb/issues/55540) @[nolouch](https://github.com/nolouch) **tw@lilin90** - 在 v8.4.0 之前,[TOP SQL](/dashboard/top-sql.md) 以 SQL 为单位来聚合 CPU 时间。如果 CPU 时间不是由少数几个 SQL 贡献,按 SQL 聚合并不能有效发现问题。从 v8.4.0 开始,你可以选择 **By TABLE** 或者 **By DB** 聚合 CPU 时间。在多系统融合的场景下,新的聚合方式能够更有效地识别来自某个特定系统的负载变化,提升问题诊断的效率。 + 在 v8.4.0 之前,[Top SQL](/dashboard/top-sql.md) 以 SQL 为单位来聚合 CPU 时间。如果 CPU 时间不是由少数几个 SQL 贡献,按 SQL 聚合并不能有效发现问题。从 v8.4.0 开始,你可以选择 **By TABLE** 或者 **By DB** 聚合 CPU 时间。在多系统融合的场景下,新的聚合方式能够更有效地识别来自某个特定系统的负载变化,提升问题诊断的效率。 更多信息,请参考[用户文档](/dashboard/top-sql.md)。 From e0db0fa66066b677eab7c3560578b9890adbc031 Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 26 Sep 2024 10:39:50 +0800 Subject: [PATCH 082/127] compatibility changes: add tidb_schema_cache_size Co-authored-by: Frank945946 <108602632+Frank945946@users.noreply.github.com> --- releases/release-8.4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index e2b864749003..0b4301fa2ed7 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -326,6 +326,7 @@ TiDB 版本:8.4.0 | [`tidb_shard_row_id_bits`](/system-variables.md#tidb_shard_row_id_bits-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行 ID 的分片位数,需要在每个 `CREATE TABLE` 或 `ALTER TABLE` 的 SQL 语句里声明 `SHARD_ROW_ID_BITS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | | [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 原有的 TiDB Hash Join 算法效率不佳,引入新的 HashJoin 版本,实现更加高效的计算 | +|tidb_schema_cache_size|修改|默认值从 0 修改为 536870912 即 512 MiB,表示默认开启该功能,且最小值允许设置为 67108864 即 64 MiB | ### 配置文件参数 From c5341bd93a56d4aa8960f968d081219572ad4123 Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 26 Sep 2024 11:09:26 +0800 Subject: [PATCH 083/127] fix website build Signed-off-by: Aolin --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 0b4301fa2ed7..373ce20c79f3 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -318,7 +318,7 @@ TiDB 版本:8.4.0 | [`tidb_enable_list_partition`](/system-variables.md#tidb_enable_list_partition-从-v50-版本开始引入) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用 [List 分区](/partitioned-table.md#list-分区)。 | | [`tidb_enable_table_partition`](/system-variables.md#tidb_enable_table_partition) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用[分区表](/partitioned-table.md)。| | [`tidb_opt_prefer_range_scan`](/system-variables.md#tidb_opt_prefer_range_scan-从-v50-版本开始引入) | 修改 | 从 v8.4.0 开始,此变量的默认值从 `OFF` 更改为 `ON`。对于没有统计信息的表(伪统计信息)或空表(零统计信息),优化器将优先选择区间扫描而不是全表扫描。| -| [`tidb_scatter_region`](/system-variables.md#tidb_scatter_region) | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 Region 只支持表级别打散。从 v8.4.0 开始,增加 `SESSION` 作用域,类型由布尔型变更为枚举型,默认值由原来的 `OFF` 变更为 ``,并增加了可选值 `TABLE` 和 `GLOBAL`。支持集群级别的打算策略,避免快速批量建表时由于 Region 分布不均匀导致 TiKV OOM 的问题。| +| [`tidb_scatter_region`](/system-variables.md#tidb_scatter_region) | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 Region 只支持表级别打散。从 v8.4.0 开始,增加 `SESSION` 作用域,类型由布尔型变更为枚举型,默认值由原来的 `OFF` 变更为 ``,并增加了可选值 `TABLE` 和 `GLOBAL`。支持集群级别的打算策略,避免快速批量建表时由于 Region 分布不均匀导致 TiKV OOM 的问题。| | [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值改为 `ON`。当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join | | [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)| 新增 | 这个变量控制是否开启 Instance Plan Cache 功能。 | | [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的目标内存大小,超过这个大小则触发清理。| From 63cb46cd143304ae24cb72b39f6d11a52991dd98 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 26 Sep 2024 11:35:20 +0800 Subject: [PATCH 084/127] Apply suggestions from code review --- releases/release-8.4.0.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 373ce20c79f3..d5f89b52abe2 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -100,13 +100,15 @@ TiDB 版本:8.4.0 * 增加获取 TSO 的 RPC 模式,降低获取 TSO 的延迟 [#54960](https://github.com/pingcap/tidb/issues/54960) @[MyonKeminta](https://github.com/MyonKeminta) **tw@qiancai** - TiDB 在向 PD 请求 TSO 时,会将一段时间内的请求汇总起来并以同步的方式进行批处理,以减少 RPC (Remote Procedure Call) 请求数量从而降低 PD 负载。对于延迟敏感的场景,这种模式的性能并不理想。在 v8.4.0 中,TiDB 新增 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。你可以通过 [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) 变量设定获取 TSO 的 RPC 模式。 + TiDB 在向 PD 请求 TSO 时,会将一段时间内的请求汇总起来并以同步的方式进行批处理,以减少 RPC (Remote Procedure Call) 请求数量从而降低 PD 负载。对于延迟敏感的场景,这种同步模式的性能并不理想。 + + 在 v8.4.0 中,TiDB 新增 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。你可以通过 [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) 变量设定获取 TSO 的 RPC 模式。 更多信息,请参考[用户文档](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入)。 * 优化 TiDB Hash Join 算子的执行效率(实验特性) [#55153](https://github.com/pingcap/tidb/issues/55153) [#53127](https://github.com/pingcap/tidb/issues/53127) @[windtalker](https://github.com/windtalker) @[xzhangxian1008](https://github.com/xzhangxian1008) @[XuHuaiyu](https://github.com/XuHuaiyu) @[wshwsh12](https://github.com/wshwsh12) **tw@qiancai** - 在 v8.4.0 中,TiDB 对 Hash Join 算子的实现方法进行了优化,以提升其执行效率。目前,优化后的 Hash Join 实现方法为实验特性,仅对 Inner Join 和 Outer Join 类型的 Hash Join 生效,且默认关闭。你可以将变量 [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) 设置为 `optimized` 开启该优化实现方法。开启后,TiDB 在执行 Inner Join 和 Outer Join 类型的 Hash Join 时,将使用优化后的实现方法。 + 在 v8.4.0 中,TiDB 对 Hash Join 算子的实现方法进行了优化,以提升其执行效率。目前,优化后的 Hash Join 实现方法且仅对 Inner Join 和 Outer Join 操作生效,且默认关闭。如需开启该优化实现方法,可以将系统变量 [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) 设置为 `optimized`。 更多信息,请参考[用户文档](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入)。 @@ -216,9 +218,9 @@ TiDB 版本:8.4.0 从 v8.4.0 开始,TiDB 支持[向量数据类型](vector-search-data-types.md)和[向量搜索索引](vector-search-index.md),具备强大的向量搜索能力。TiDB 的向量数据类型最多可支持 16383 维度,并支持多种[距离函数](/vector-search-functions-and-operators.md#向量函数),包括 L2 距离(欧式距离)、余弦距离、负内积和 L1 距离(曼哈顿距离)。 - 在使用时,你只需要创建包含向量数据类型的表,并插入向量数据,即可执行向量搜索查询,也可进行向量数据与传统关系数据的混合查询。此外,你可以创建并利用向量搜索索引来提升向量搜索的性能。 + 在使用时,你只需要创建包含向量数据类型的表,并插入向量数据,即可执行向量搜索查询,也可进行向量数据与传统关系数据的混合查询。 - 需要注意的是,TiDB 的向量搜索索引依赖于 TiFlash。因此,在使用向量搜索索引之前,需要确保 TiDB 集群中已部署 TiFlash 节点。 + 此外,你可以创建并利用向量搜索索引来提升向量搜索的性能。需要注意的是,TiDB 的向量搜索索引依赖于 TiFlash。因此,在使用向量搜索索引之前,需要确保 TiDB 集群中已部署 TiFlash 节点。 更多信息,请参考[用户文档](/vector-search-overview.md)。 From 586b80c89ec7b4021697e0563dcbd53abf3abdba Mon Sep 17 00:00:00 2001 From: lilin90 Date: Thu, 26 Sep 2024 11:54:25 +0800 Subject: [PATCH 085/127] Update TiDB Binlog removal --- releases/release-8.4.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index d5f89b52abe2..70ef7acf2ac5 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -343,8 +343,8 @@ TiDB 版本:8.4.0 | TiKV | in_memory_global_size_limit | 新增 | 该配置文件参数用于指定 TiKV 实例的内存悲观锁的内存上限 | | TiKV | [`raft-engine.spill-dir`](/tikv-configuration-file.md#spill-dir-从-v840-版本开始引入) | 新增 | 该配置文件参数用于指定 TiKV 实例存储 Raft 日志文件的辅助目录,用于支持多盘存储 Raft 日志文件 | | TiKV | [`resource-control.priority-ctl-strategy`](/tikv-configuration-file.md#priority-ctl-strategy-从-v840-版本开始引入) | 新增 | 该配置文件参数用于配置低优先级任务的管控策略。TiKV 通过对低优先级的任务添加流量控制来确保优先执行更高优先级的任务。 | -| PD | [`max-merge-region-keys`](/pd-configuration-file.md#max-merge-region-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `540000`。在 v8.4.0 之前,默认值为 `200000`。 | -| PD | [`max-merge-region-size`](/pd-configuration-file.md#max-merge-region-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `54`。在 v8.4.0 之前,默认值为 `20`。 | +| PD | [`max-merge-region-keys`](/pd-configuration-file.md#max-merge-region-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `540000`。在 v8.4.0 之前,默认值为 `200000`。 | +| PD | [`max-merge-region-size`](/pd-configuration-file.md#max-merge-region-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `54`。在 v8.4.0 之前,默认值为 `20`。 | ### 系统表 @@ -355,7 +355,7 @@ TiDB 版本:8.4.0 * 以下为从 v8.4.0 开始已移除的功能: - * TiDB Binlog replication is now removed from this version. Starting from v8.3.0, TiDB Binlog was fully deprecated. For incremental data replication, use [TiCDC](/ticdc-overview.md) instead. For point-in-time recovery (PITR), use [PITR](/br-pitr-guide.md). **tw@lilin90** + * [TiDB Binlog](https://docs.pingcap.com/zh/tidb/v8.3/tidb-binlog-overview) 在 v8.4.0 中被移除。从 v8.3.0 开始,TiDB Binlog 被完全废弃。如需进行增量数据同步,请使用 [TiCDC](/ticdc/ticdc-overview.md)。如需按时间点恢复 (point-in-time recovery, PITR),请使用 [PITR](/br/br-pitr-guide.md)。在将 TiDB 集群升级到 v8.4.0 或之后版本前,务必先切换至 TiCDC 和 PITR。**tw@lilin90** * 以下为从 v8.4.0 开始已废弃的功能: From 655397ddcd061b692bd21535a0a659dca703e82a Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Thu, 26 Sep 2024 14:15:08 +0800 Subject: [PATCH 086/127] Apply suggestions from code review Co-authored-by: xixirangrang --- releases/release-8.4.0.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 70ef7acf2ac5..a7ed2f78860c 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -134,9 +134,9 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)。 -* TiDB Lightning 的逻辑导入支持预处理语句和客户端语句缓存 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) **tw@lilin90** +* TiDB Lightning 的逻辑导入模式支持预处理语句和客户端语句缓存 [#54850](https://github.com/pingcap/tidb/issues/54850) @[dbsid](https://github.com/dbsid) **tw@lilin90** - 通过开启配置项 `logical-import-prep-stmt`,TiDB Lightning 逻辑导入产生的 SQL 语句将通过使用预处理语句和客户端语句缓存,降低 TiDB SQL 解析和编译的成本,提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 + 通过开启配置项 `logical-import-prep-stmt`,TiDB Lightning 逻辑导入模式中执行的 SQL 语句将通过使用预处理语句和客户端语句缓存,降低 TiDB SQL 解析和编译的成本,提升 SQL 执行效率,并有更大机会命中执行计划缓存,提升逻辑导入的速度。 更多信息,请参考[用户文档](/tidb-lightning/tidb-lightning-configuration.md)。 @@ -156,7 +156,7 @@ TiDB 版本:8.4.0 ### 稳定性 -* 超出预期的查询 (Runaway Queries) 新增处理行数 和 RU 作为阈值 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** +* 超出预期的查询 (Runaway Queries) 新增处理行数和 Request Unit 作为阈值 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** 从 v8.4.0 开始, TiDB 可以依据处理行数 (`PROCESSED_KEYS`) 和 Request Unit (`RU`) 定义超出预期的查询。和执行时间 (`EXEC_ELAPSED`) 相比,新增阈值能够更准确地定义查询的资源消耗,避免整体性能下降时发生识别偏差。 @@ -351,7 +351,7 @@ TiDB 版本:8.4.0 ## 离线包变更 -## 废弃功能 +## 废弃和移除的功能 * 以下为从 v8.4.0 开始已移除的功能: From 87d6a2ec57ddb5fbcedda0f33669c038e3e4fdf9 Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 26 Sep 2024 15:13:29 +0800 Subject: [PATCH 087/127] add GitHub issue link for automatic statistics collection --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index a7ed2f78860c..87ad6b62b3d4 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -384,7 +384,7 @@ TiDB 版本:8.4.0 - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - - 自动统计信息收集根据部署规模和硬件规格决定执行和扫描的并发度 [#issue号](链接) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + - 自动统计信息收集根据节点规模和硬件规格自动确定执行和扫描的并发度 [#53460](https://github.com/pingcap/tidb/issues/53460) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + TiKV From 1307f1e49b33df3878b95965776e466b724c946c Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Thu, 26 Sep 2024 15:34:46 +0800 Subject: [PATCH 088/127] Remove foreign key GA --- releases/release-8.4.0.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 87ad6b62b3d4..ebba49d5ad45 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -61,11 +61,7 @@ TiDB 版本:8.4.0 自动统计信息收集会根据节点规模和硬件规格自动确定收集并发度,提高统计信息收集效率,减少手动调优,确保集群性能稳定。 - SQL - 外键成为正式功能**tw@lilin90 1894** - 支持 MySQL 兼容的外键约束,维护数据一致性,进一步提升了 TiDB 对 MySQL 的兼容能力。 - - + SQL 向量搜索功能(实验特性)**tw@qiancai 1898** 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 @@ -224,12 +220,6 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/vector-search-overview.md)。 -* TiDB 外键约束检查成为正式功能 (GA) [#55861](https://github.com/pingcap/tidb/issues/55861) @[YangKeao](https://github.com/YangKeao) **tw@lilin90** - - 从 v6.6.0 开始,TiDB 支持通过系统变量 [`foreign_key_checks`](/system-variables.md#foreign_key_checks) 做外键约束检查,但一直为实验特性。v8.4.0 对外键特性在更多场景做了覆盖测试,提升了稳定性和性能,因此从 v8.4.0 开始,外键功能成为正式功能 (GA)。 - - 更多信息,请参考[用户文档](/foreign-key.md)。 - * 支持字符集 `gb18030` 和排序规则 `gb18030_bin` 和 `gb18030_chinese_ci` [#17470](https://github.com/tikv/tikv/issues/17470) [#55791](https://github.com/pingcap/tidb/issues/55791) @[cbcwestwolf](https://github.com/cbcwestwolf) **tw@lilin90** 从 v8.4.0 开始,TiDB 支持 `gb18030` 字符集,以确保 TiDB 能够更好地处理中文相关的数据存储和查询需求。该字符集是一个广泛用于中文字符编码的标准。 From b63daae7e1ee4bea7de2f2d058ea12d88c5e7323 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 26 Sep 2024 15:54:39 +0800 Subject: [PATCH 089/127] Apply suggestions from code review --- releases/release-8.4.0.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index ebba49d5ad45..6795fda9500a 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -35,10 +35,6 @@ TiDB 版本:8.4.0 TiDB 并行获取 TSO**tw@qiancai 1893** 在高并发场景下,并行获取 TSO 能够有效降低等待获取 TSO 的时间,提升集群的吞吐。 - - 提升管理类 SQL 的执行效率**tw@hfxsd 1941** - 在一部分 SaaS 系统中,存在批量创建大量用户,以及定期轮换所有用户密码的需求。TiDB 提升了创建和修改数据库用户的性能,保证操作能在期望的时间窗口。 - 提升缓存表的查询性能**tw@hfxsd 1965** 优化了缓存表索引扫描的查询性能,部分场景可提升 5.4 倍。在需要对小表进行高速查询的场景下,利用缓存表可大幅提升整体性能。 @@ -115,10 +111,6 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/functions-and-operators/expressions-pushed-down.md)。 -* 提升批量创建用户和修改用户密码操作的性能,提升达数百倍 [#55604](https://github.com/pingcap/tidb/pull/55604) @[wjhuang2016](https://github.com/wjhuang2016) **tw@hfxsd** - - 在 SaaS 场景下,你可能需要在指定时间内批量创建大量用户、以及定期轮换所有用户密码。从 v8.4.0 开始,提升了批量创建用户、批量修改用户密码的性能,而且你可以通过增加会话连接数来提升并发,提升性能,从而大幅缩短该场景下的执行时间。 - * 实例级执行计划缓存(实验特性)[#54057](https://github.com/pingcap/tidb/issues/54057) @[qw4990](https://github.com/qw4990) **tw@Oreoxmt** TiDB v8.4.0 引入实例级执行计划缓存作为实验特性。该功能允许同一个 TiDB 实例的所有会话共享执行计划缓存,能够大幅降低 TiDB 的时延、提升集群吞吐、减少执行计划突变的可能性、保持集群性能的稳定,是 TiDB 改善性能和稳定性的重要改进。相比会话级执行计划缓存,实例级执行计划缓存具有以下优势: @@ -146,9 +138,9 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/partitioned-table.md#全局索引)。 -* 优化了缓存表在部分场景下的查询性能 [#43249](https://github.com/pingcap/tidb/issues/43249) @[tiancaiamao](https://github.com/tiancaiamao) **tw@hfxsd** +* 优化缓存表在部分场景下的查询性能 [#43249](https://github.com/pingcap/tidb/issues/43249) @[tiancaiamao](https://github.com/tiancaiamao) **tw@hfxsd** - 优化了缓存表的查询性能,在使用 `IndexLookup` 执行 `SELECT ... LIMIT 1` 时,性能最高提升 5.4 倍。同时,提升了 `IndexLookupReader` 在全表扫描和主键查询场景下的性能。 + 优化缓存表的查询性能,在使用 `IndexLookup` 执行 `SELECT ... LIMIT 1` 时,性能最高提升 5.4 倍。同时,提升 `IndexLookupReader` 在全表扫描和主键查询场景下的性能。 ### 稳定性 @@ -310,7 +302,7 @@ TiDB 版本:8.4.0 | [`tidb_enable_list_partition`](/system-variables.md#tidb_enable_list_partition-从-v50-版本开始引入) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用 [List 分区](/partitioned-table.md#list-分区)。 | | [`tidb_enable_table_partition`](/system-variables.md#tidb_enable_table_partition) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用[分区表](/partitioned-table.md)。| | [`tidb_opt_prefer_range_scan`](/system-variables.md#tidb_opt_prefer_range_scan-从-v50-版本开始引入) | 修改 | 从 v8.4.0 开始,此变量的默认值从 `OFF` 更改为 `ON`。对于没有统计信息的表(伪统计信息)或空表(零统计信息),优化器将优先选择区间扫描而不是全表扫描。| -| [`tidb_scatter_region`](/system-variables.md#tidb_scatter_region) | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 Region 只支持表级别打散。从 v8.4.0 开始,增加 `SESSION` 作用域,类型由布尔型变更为枚举型,默认值由原来的 `OFF` 变更为 ``,并增加了可选值 `TABLE` 和 `GLOBAL`。支持集群级别的打算策略,避免快速批量建表时由于 Region 分布不均匀导致 TiKV OOM 的问题。| +| [`tidb_scatter_region`](/system-variables.md#tidb_scatter_region) | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 Region 只支持表级别打散。从 v8.4.0 开始,增加 `SESSION` 作用域,类型由布尔型变更为枚举型,默认值由原来的 `OFF` 变更为空,并增加了可选值 `TABLE` 和 `GLOBAL`。支持集群级别的打算策略,避免快速批量建表时由于 Region 分布不均匀导致 TiKV OOM 的问题。| | [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值改为 `ON`。当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join | | [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)| 新增 | 这个变量控制是否开启 Instance Plan Cache 功能。 | | [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的目标内存大小,超过这个大小则触发清理。| From f505c95fd5ea33b48b311199b9acf46a98ca672d Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 26 Sep 2024 17:04:55 +0800 Subject: [PATCH 090/127] Apply suggestions from code review --- releases/release-8.4.0.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 6795fda9500a..3fafdd7ab49a 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -32,7 +32,7 @@ TiDB 版本:8.4.0 全局索引可以有效提高检索非分区列的效率,并且消除了唯一键必须包含分区键的限制。该功能扩展了 TiDB 分区表的使用场景,避免了数据迁移过程中的一些应用修改工作。 - TiDB 并行获取 TSO**tw@qiancai 1893** + TiDB 并行获取 TSO**tw@qiancai 1893** 在高并发场景下,并行获取 TSO 能够有效降低等待获取 TSO 的时间,提升集群的吞吐。 @@ -58,7 +58,7 @@ TiDB 版本:8.4.0 SQL - 向量搜索功能(实验特性)**tw@qiancai 1898** + >向量搜索功能(实验特性)**tw@qiancai 1898** 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 @@ -72,7 +72,7 @@ TiDB 版本:8.4.0 安全 - 日志备份数据支持客户端加密(实验特性)**tw@qiancai 1920** + 日志备份数据支持客户端加密(实验特性)**tw@qiancai 1920** 在上传日志备份到备份存储之前,你可以对日志备份数据进行加密,确保数据在存储和传输过程中的安全性。 @@ -208,7 +208,7 @@ TiDB 版本:8.4.0 在使用时,你只需要创建包含向量数据类型的表,并插入向量数据,即可执行向量搜索查询,也可进行向量数据与传统关系数据的混合查询。 - 此外,你可以创建并利用向量搜索索引来提升向量搜索的性能。需要注意的是,TiDB 的向量搜索索引依赖于 TiFlash。因此,在使用向量搜索索引之前,需要确保 TiDB 集群中已部署 TiFlash 节点。 + 此外,你可以创建并利用向量搜索索引来提升向量搜索的性能。需要注意的是,TiDB 的向量搜索索引依赖于 TiFlash。在使用向量搜索索引之前,需要确保 TiDB 集群中已部署 TiFlash 节点。 更多信息,请参考[用户文档](/vector-search-overview.md)。 @@ -226,7 +226,7 @@ TiDB 版本:8.4.0 * 日志备份数据支持客户端加密(实验特性)[#55834](https://github.com/pingcap/tidb/issues/55834) @[Tristan1900](https://github.com/Tristan1900) **tw@qiancai** - 在之前的版本中,仅快照备份数据支持客户端加密。从 v8.4.0 起,日志备份数据也支持客户端加密。在上传日志备份到备份存储之前,你可以选择以下方式之一对日志备份数据进行加密,从而提高备份数据的安全性: + 在之前的版本中,仅快照备份数据支持客户端加密。从 v8.4.0 起,日志备份数据也支持客户端加密。在上传日志备份到备份存储之前,你可以选择以下方式之一对日志备份数据进行加密,从而确保备份数据的安全性: - 使用自定义的固定密钥加密 - 使用本地磁盘的主密钥加密 @@ -309,7 +309,7 @@ TiDB 版本:8.4.0 | [`tidb_pre_split_regions`](/system-variables.md#tidb_pre_split_regions-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行分裂分片数,需要在每个 `CREATE TABLE` SQL 语句里声明 `PRE_SPLIT_REGIONS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [`tidb_shard_row_id_bits`](/system-variables.md#tidb_shard_row_id_bits-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行 ID 的分片位数,需要在每个 `CREATE TABLE` 或 `ALTER TABLE` 的 SQL 语句里声明 `SHARD_ROW_ID_BITS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | -| [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 原有的 TiDB Hash Join 算法效率不佳,引入新的 HashJoin 版本,实现更加高效的计算 | +| [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 控制 TiDB 在执行 Hash Join 算子时是否使用优化后的实现方法。默认值为 `legacy`,代表不使用优化后的实现方法。若设置为 `optimized`,TiDB 在执行 Hash Join 算子时将使用优化后的实现方法,以提升 Hash Join 性能。 | |tidb_schema_cache_size|修改|默认值从 0 修改为 536870912 即 512 MiB,表示默认开启该功能,且最小值允许设置为 67108864 即 64 MiB | ### 配置文件参数 From c767fdadc00834ea1ca2612e2077d5bb8963929d Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 26 Sep 2024 17:51:38 +0800 Subject: [PATCH 091/127] Apply suggestions from code review --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 3fafdd7ab49a..bc70781020ff 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -100,7 +100,7 @@ TiDB 版本:8.4.0 * 优化 TiDB Hash Join 算子的执行效率(实验特性) [#55153](https://github.com/pingcap/tidb/issues/55153) [#53127](https://github.com/pingcap/tidb/issues/53127) @[windtalker](https://github.com/windtalker) @[xzhangxian1008](https://github.com/xzhangxian1008) @[XuHuaiyu](https://github.com/XuHuaiyu) @[wshwsh12](https://github.com/wshwsh12) **tw@qiancai** - 在 v8.4.0 中,TiDB 对 Hash Join 算子的实现方法进行了优化,以提升其执行效率。目前,优化后的 Hash Join 实现方法且仅对 Inner Join 和 Outer Join 操作生效,且默认关闭。如需开启该优化实现方法,可以将系统变量 [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) 设置为 `optimized`。 + 在 v8.4.0 中,TiDB 对 Hash Join 算子的实现方法进行了优化,以提升其执行效率。目前,优化版的 Hash Join 且仅对 Inner Join 和 Outer Join 操作生效,且默认关闭。如需开启优化版的 Hash Join,可以将系统变量 [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) 设置为 `optimized`。 更多信息,请参考[用户文档](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入)。 @@ -309,7 +309,7 @@ TiDB 版本:8.4.0 | [`tidb_pre_split_regions`](/system-variables.md#tidb_pre_split_regions-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行分裂分片数,需要在每个 `CREATE TABLE` SQL 语句里声明 `PRE_SPLIT_REGIONS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [`tidb_shard_row_id_bits`](/system-variables.md#tidb_shard_row_id_bits-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行 ID 的分片位数,需要在每个 `CREATE TABLE` 或 `ALTER TABLE` 的 SQL 语句里声明 `SHARD_ROW_ID_BITS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | -| [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 控制 TiDB 在执行 Hash Join 算子时是否使用优化后的实现方法。默认值为 `legacy`,代表不使用优化后的实现方法。若设置为 `optimized`,TiDB 在执行 Hash Join 算子时将使用优化后的实现方法,以提升 Hash Join 性能。 | +| [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 控制 TiDB 是否使用 Hash Join 算子的优化版。默认值为 `legacy`,代表不使用优化版。若设置为 `optimized`,TiDB 在执行 Hash Join 算子时将使用其优化版,以提升 Hash Join 性能。 | |tidb_schema_cache_size|修改|默认值从 0 修改为 536870912 即 512 MiB,表示默认开启该功能,且最小值允许设置为 67108864 即 64 MiB | ### 配置文件参数 From 5d42520022f038b01eac392458609d7d5e086208 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Fri, 27 Sep 2024 10:04:07 +0800 Subject: [PATCH 092/127] Update releases/release-8.4.0.md Co-authored-by: xixirangrang --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index bc70781020ff..7dcd10ec45c7 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -254,7 +254,7 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/information-schema/information-schema-processlist.md)和[用户文档](information-schema/information-schema-slow-query.md)。 -* Top SQL 支持按表或数据库维度查看聚合结果 [#55540](https://github.com/pingcap/tidb/issues/55540) @[nolouch](https://github.com/nolouch) **tw@lilin90** +* Top SQL 支持按表或数据库维度查看 CPU 时间的聚合结果 [#55540](https://github.com/pingcap/tidb/issues/55540) @[nolouch](https://github.com/nolouch) **tw@lilin90** 在 v8.4.0 之前,[Top SQL](/dashboard/top-sql.md) 以 SQL 为单位来聚合 CPU 时间。如果 CPU 时间不是由少数几个 SQL 贡献,按 SQL 聚合并不能有效发现问题。从 v8.4.0 开始,你可以选择 **By TABLE** 或者 **By DB** 聚合 CPU 时间。在多系统融合的场景下,新的聚合方式能够更有效地识别来自某个特定系统的负载变化,提升问题诊断的效率。 From 886dbc3dfad5c7628f7a57d1c9d929d840eee826 Mon Sep 17 00:00:00 2001 From: Aolin Date: Fri, 27 Sep 2024 14:50:22 +0800 Subject: [PATCH 093/127] bug fixes and improvements: fix indention and add dup notes Signed-off-by: Aolin --- releases/release-8.4.0.md | 85 +++++++++++++++++++++++++++++++-------- 1 file changed, 68 insertions(+), 17 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 7dcd10ec45c7..8022e1303cc2 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -358,72 +358,123 @@ TiDB 版本:8.4.0 ## 改进提升 + TiDB - - 优化扫描大量数据时构造 BatchCop Task 的效率 [#55915](https://github.com/pingcap/tidb/issues/55915) [#55413](https://github.com/pingcap/tidb/issues/55413) @[wshwsh12](https://github.com/wshwsh12) **tw@caiqian** - - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** - - 优化系统变量 `tidb_dml_type` 为 `"bulk"` 时 DML 语句的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制是否将优化器为 `estRows` 估算的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低大量并发写入引发的开销 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - - 自动统计信息收集根据节点规模和硬件规格自动确定执行和扫描的并发度 [#53460](https://github.com/pingcap/tidb/issues/53460) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + + - 优化扫描大量数据时构造 BatchCop Task 的效率 [#55915](https://github.com/pingcap/tidb/issues/55915) [#55413](https://github.com/pingcap/tidb/issues/55413) @[wshwsh12](https://github.com/wshwsh12) **tw@caiqian** + - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** + - 优化系统变量 `tidb_dml_type` 为 `"bulk"` 时 DML 语句的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** + - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制是否将优化器为 `estRows` 估算的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** + - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低大量并发写入引发的开销 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** + - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@Oreoxmt** + - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** + - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** + - 自动统计信息收集根据节点规模和硬件规格自动确定执行和扫描的并发度 [#53460](https://github.com/pingcap/tidb/issues/53460) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + TiKV - - Region 的默认值由 96 MiB 提升到 256 MiB,避免 Region 数量过多导致额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - - 支持指定单个 Region 或 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多的情况下,可以通过修改配置提高内存上限,避免悲观锁落盘导致的 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@Oreoxmt** -- Raft Engine 新增 `spill-dir` 配置,支持 Raft 日志的多磁盘存储。当主目录 `dir `所在磁盘的容量不足时,Raft Engine 会自动将新日志写入 `spill-dir`,从而确保系统的持续运行。[LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - Region 的默认值由 96 MiB 提升到 256 MiB,避免 Region 数量过多导致额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** + - 支持指定单个 Region 或 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多的情况下,可以通过修改配置提高内存上限,避免悲观锁落盘导致的 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@Oreoxmt** + - Raft Engine 新增 `spill-dir` 配置,支持 Raft 日志的多磁盘存储。当主目录 `dir `所在磁盘的容量不足时,Raft Engine 会自动将新日志写入 `spill-dir`,从而确保系统的持续运行。[LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** + - (dup): release-6.5.11.md > 改进提升> TiKV - 优化存在大量 DELETE 版本时 RocksDB 的 compaction 触发机制,以加快磁盘空间回收 [#17269](https://github.com/tikv/tikv/issues/17269) @[AndreMouche](https://github.com/AndreMouche) + PD - - 支持 TiKV 节点在 TiDB Lightning 导入数据期间优雅下线 (graceful offline) [#7853](https://github.com/tikv/pd/issues/7853) @[okJiang](https://github.com/okJiang) **tw@qiancai** + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - 支持 TiKV 节点在 TiDB Lightning 导入数据期间优雅下线 (graceful offline) [#7853](https://github.com/tikv/pd/issues/7853) @[okJiang](https://github.com/okJiang) **tw@qiancai** + TiFlash + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - (dup): release-6.5.11.md > 改进提升> TiFlash - 优化 `LENGTH()` 和 `ASCII()` 函数执行效率 [#9344](https://github.com/pingcap/tiflash/issues/9344) @[xzhangxian1008](https://github.com/xzhangxian1008) + + Tools + Backup & Restore (BR) - - 当集群的 `split-table` 和 `split-region-on-table` 配置项为默认值 `false` 时,BR 在恢复数据到该集群的过程中不会按照 table 分裂 Region,以提升恢复速度 [#53532](https://github.com/pingcap/tidb/issues/53532) @[Leavrth](https://github.com/Leavrth) **tw@qiancai** - - 默认不支持使用 SQL 语句 `RESTORE` 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - 当集群的 `split-table` 和 `split-region-on-table` 配置项为默认值 `false` 时,BR 在恢复数据到该集群的过程中不会按照 table 分裂 Region,以提升恢复速度 [#53532](https://github.com/pingcap/tidb/issues/53532) @[Leavrth](https://github.com/Leavrth) **tw@qiancai** + - 默认不支持使用 SQL 语句 `RESTORE` 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + TiCDC + - note [#issue](https://github.com/pingcap/tiflow/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - note [#issue](https://github.com/pingcap/tiflow/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + + TiDB Data Migration (DM) + - note [#issue](https://github.com/pingcap/tiflow/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - note [#issue](https://github.com/pingcap/tiflow/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + + TiDB Lightning + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + + Dumpling + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + + TiUP - + TiDB Binlog + - note [#issue](https://github.com/pingcap/tiup/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - note [#issue](https://github.com/pingcap/tiup/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) ## 错误修复 + TiDB + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - (dup): release-6.5.11.md > 错误修复> TiDB - 修复 `IndexNestedLoopHashJoin` 中存在数据竞争的问题 [#49692](https://github.com/pingcap/tidb/issues/49692) @[solotzg](https://github.com/solotzg) + - (dup): release-6.5.11.md > 错误修复> TiDB - 修复 `INFORMATION_SCHEMA.STATISTICS` 表中 `SUB_PART` 值为空的问题 [#55812](https://github.com/pingcap/tidb/issues/55812) @[Defined2014](https://github.com/Defined2014) + - (dup): release-6.5.11.md > 错误修复> TiDB - 修复 DML 语句中包含嵌套的生成列时报错的问题 [#53967](https://github.com/pingcap/tidb/issues/53967) @[wjhuang2016](https://github.com/wjhuang2016) + + TiKV + - note [#issue](https://github.com/tikv/tikv/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - (dup): release-6.5.11.md > 错误修复> TiKV - 修复当主密钥存储于 KMS (Key Management Service) 时无法轮换主密钥的问题 [#17410](https://github.com/tikv/tikv/issues/17410) @[hhwyt](https://github.com/hhwyt) + - (dup): release-6.5.11.md > 错误修复> TiKV - 修复删除大表或分区后可能导致的流量控制问题 [#17304](https://github.com/tikv/tikv/issues/17304) @[Connor1996](https://github.com/Connor1996) + - (dup): release-6.5.11.md > 错误修复> TiKV - 修复过期副本处理 Raft 快照时,由于分裂操作过慢并且随后立即删除新副本,可能导致 TiKV panic 的问题 [#17469](https://github.com/tikv/tikv/issues/17469) @[hbisheng](https://github.com/hbisheng) + + PD + - note [#issue](https://github.com/tikv/pd/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - (dup): release-8.1.1.md > 错误修复> PD - 修复 `INFORMATION_SCHEMA.RUNAWAY_WATCHES` 表中时间类型不正确的问题 [#54770](https://github.com/pingcap/tidb/issues/54770) @[HuSharp](https://github.com/HuSharp) + + TiFlash + - note [#issue](https://github.com/pingcap/tiflash/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - note [#issue](https://github.com/pingcap/tiflash/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + + Tools + Backup & Restore (BR) + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - (dup): release-6.5.11.md > 错误修复> Tools> Backup & Restore (BR) - 修复备份过程中由于 TiKV 没有响应导致备份任务无法结束的问题 [#53480](https://github.com/pingcap/tidb/issues/53480) @[Leavrth](https://github.com/Leavrth) + - (dup): release-6.5.11.md > 错误修复> Tools> Backup & Restore (BR) - 修复开启日志备份时,BR 日志可能打印权限凭证敏感信息的问题 [#55273](https://github.com/pingcap/tidb/issues/55273) @[RidRisR](https://github.com/RidRisR) + - (dup): release-6.5.11.md > 错误修复> Tools> Backup & Restore (BR) - 修复当 PITR 日志备份任务失败时,用户停止了该任务后,PD 中与该任务相关的 safepoint 未被正确清除的问题 [#17316](https://github.com/tikv/tikv/issues/17316) @[Leavrth](https://github.com/Leavrth) + + TiCDC + - note [#issue](https://github.com/pingcap/tiflow/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + + TiDB Data Migration (DM) + - note [#issue](https://github.com/pingcap/tiflow/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - (dup): release-6.5.11.md > 错误修复> Tools> TiDB Data Migration (DM) - 修复 DM 在处理 `ALTER DATABASE` 语句时未设置默认数据库导致同步报错的问题 [#11503](https://github.com/pingcap/tiflow/issues/11503) @[lance6716](https://github.com/lance6716) + + TiDB Lightning + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + + Dumpling + - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + + TiUP - + TiDB Binlog + - note [#issue](https://github.com/pingcap/tiup/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) ## 贡献者 From 91e57fae253a31d6d5514216262a8bf04e04fb91 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Fri, 27 Sep 2024 14:54:58 +0800 Subject: [PATCH 094/127] Apply suggestions from code review --- releases/release-8.4.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 8022e1303cc2..0c0d27a5d3b6 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -160,11 +160,11 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/tidb-resource-control.md#query_limit-参数说明)。 -* 系统变量 `tidb_scatter_region` 支持设置集群级别的 Region 打散策略 [#55184](https://github.com/pingcap/tidb/issues/55184) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** +* 支持使用系统变量 `tidb_scatter_region` 设置集群级别的 Region 打散策略 [#55184](https://github.com/pingcap/tidb/issues/55184) @[D3Hunter](https://github.com/D3Hunter) **tw@hfxsd** - 系统变量 `tidb_scatter_region` 在之前的版本仅支持设置为开启或者关闭,开启后,建表时会使用表级别打散策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。 + 在 v8.4.0 之前,系统变量 `tidb_scatter_region` 仅支持设置为开启或者关闭。开启后,建表时会使用表级别打散策略。在批量快速建表,且表的数量达到几十万张后,该策略会导致 Region 集中分布在其中几个 TiKV 节点,导致这些 TiKV 节点 OOM。 - 为解决上述问题,从 v8.4.0 版本开始,将该系统变量改为字符串类型,且新增支持集群级别的打散策略,避免上述场景下导致 TiKV OOM 的问题。 + 从 v8.4.0 开始,该系统变量改为字符串类型,且新增支持集群级别的打散策略,避免上述场景下导致 TiKV OOM 的问题。 更多信息,请参考[用户文档](/system-variables.md#tidb_scatter_region)。 From c9b6896fdf82fdcdd7ceaed49c274fb0841427d8 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Fri, 27 Sep 2024 17:09:24 +0800 Subject: [PATCH 095/127] Update releases/release-8.4.0.md Co-authored-by: JaySon --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 0c0d27a5d3b6..c80e22156566 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -200,7 +200,7 @@ TiDB 版本:8.4.0 ### SQL 功能 -* 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) **tw@qiancai** +* 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) @[winoros](https://github.com/winoros) **tw@qiancai** 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 From 6952c8cc568c9b650189efd88663001a4a0917b4 Mon Sep 17 00:00:00 2001 From: Roger Song Date: Fri, 27 Sep 2024 18:13:06 +0800 Subject: [PATCH 096/127] include the enhancement of top sql in highlights --- releases/release-8.4.0.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index c80e22156566..0cbba65b822d 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -62,10 +62,14 @@ TiDB 版本:8.4.0 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 - 数据库管理和可观测性 + 数据库管理和可观测性 在内存表中显示 TiKV 和 TiDB 的 CPU 时间**tw@hfxsd 1877** 将 CPU 时间合入系统表中展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测,提升诊断效率。尤其适用于诊断实例 CPU 飙升或集群读写热点等场景。 + + 按表或数据库聚合 TiKV 的 CPU 时间**tw@lilin90 1878** + 当热点问题不是由个别 SQL 语句引起时,利用 TOP SQL 中按表或者数据库聚合的 CPU 时间,能够协助用户快速发现造成热点的表或者应用程序。大大提升热点问题和 CPU 消耗问题的诊断效率。 + 支持对开启了 IMDSv2 服务的 TiKV 实例做备份**tw@hfxsd 1945** 目前 AWS EC2 的默认元数据服务是 IMDSv2。TiDB 支持从开启了 IMDSv2 的 TiKV 实例中备份数据,协助你更好地在公有云服务中运行 TiDB 集群。 From d5b94cb3da51972d55d49a2559d426c6c0662349 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Fri, 27 Sep 2024 18:22:46 +0800 Subject: [PATCH 097/127] Apply suggestions from code review --- releases/release-8.4.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 0cbba65b822d..deffe7bd716d 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -246,7 +246,7 @@ TiDB 版本:8.4.0 ### 可观测性 -* 在系统表中显示 TiDB 和 TiKV 的 CPU 的时间 [#55542](https://github.com/pingcap/tidb/issues/55542) @[yibin87](https://github.com/yibin87) **tw@hfxsd** +* 在系统表中显示 TiDB 和 TiKV 消耗的 CPU 时间 [#55542](https://github.com/pingcap/tidb/issues/55542) @[yibin87](https://github.com/yibin87) **tw@hfxsd** [TiDB Dashboard](/dashboard/dashboard-intro.md) 的 [Top SQL 页面](/dashboard/top-sql.md)能够展示 CPU 消耗高的 SQL 语句。从 v8.4.0 开始,TiDB 将 CPU 时间消耗信息加入系统表展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测。在实例 CPU 飙升或集群读写热点的场景下,这些信息能够协助你快速发现问题的原因。 @@ -268,7 +268,7 @@ TiDB 版本:8.4.0 * BR 支持 AWS IMDSv2 [#16443](https://github.com/tikv/tikv/issues/16443) @[pingyu](https://github.com/pingyu) **tw@hfxsd** - 在 AWS EC2 上部署 TiDB 时,BR 支持 AWS 的 Instance Metadata Service Version 2 (IMDSv2)。你可以在 EC2 实例上进行相关配置,使 BR 可以使用与实例关联的 IAM 角色以适当的权限访问 AWS S3。 + 在 Amazon EC2 上部署 TiDB 时,BR 支持 AWS 的 Instance Metadata Service Version 2 (IMDSv2)。你可以在 EC2 实例上进行相关配置,使 BR 可以使用与实例关联的 IAM 角色以适当的权限访问 Amazon S3。 更多信息,请参考[用户文档](/br/backup-and-restore-storages.md#鉴权)。 @@ -378,7 +378,7 @@ TiDB 版本:8.4.0 - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) - Region 的默认值由 96 MiB 提升到 256 MiB,避免 Region 数量过多导致额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - 支持指定单个 Region 或 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多的情况下,可以通过修改配置提高内存上限,避免悲观锁落盘导致的 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@Oreoxmt** - - Raft Engine 新增 `spill-dir` 配置,支持 Raft 日志的多磁盘存储。当主目录 `dir `所在磁盘的容量不足时,Raft Engine 会自动将新日志写入 `spill-dir`,从而确保系统的持续运行。[LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** + - Raft Engine 新增 `spill-dir` 配置,支持 Raft 日志的多磁盘存储。当主目录 `dir` 所在磁盘的容量不足时,Raft Engine 会自动将新日志写入 `spill-dir`,从而确保系统的持续运行。[LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - (dup): release-6.5.11.md > 改进提升> TiKV - 优化存在大量 DELETE 版本时 RocksDB 的 compaction 触发机制,以加快磁盘空间回收 [#17269](https://github.com/tikv/tikv/issues/17269) @[AndreMouche](https://github.com/AndreMouche) + PD From cccda2ffa7f255b22cb0ca1af0d1c9623d48305c Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Fri, 27 Sep 2024 18:32:13 +0800 Subject: [PATCH 098/127] Update a link --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index deffe7bd716d..b2bba51f25d3 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -68,7 +68,7 @@ TiDB 版本:8.4.0 按表或数据库聚合 TiKV 的 CPU 时间**tw@lilin90 1878** - 当热点问题不是由个别 SQL 语句引起时,利用 TOP SQL 中按表或者数据库聚合的 CPU 时间,能够协助用户快速发现造成热点的表或者应用程序。大大提升热点问题和 CPU 消耗问题的诊断效率。 + 当热点问题不是由个别 SQL 语句引起时,利用 TOP SQL 中按表或者数据库聚合的 CPU 时间,能够协助用户快速发现造成热点的表或者应用程序。大大提升热点问题和 CPU 消耗问题的诊断效率。 支持对开启了 IMDSv2 服务的 TiKV 实例做备份**tw@hfxsd 1945** From 07fd3f0c2d9aea487f8ec04fe1b1351c082fc43f Mon Sep 17 00:00:00 2001 From: lilin90 Date: Fri, 27 Sep 2024 18:36:08 +0800 Subject: [PATCH 099/127] Update rowspan to fix format --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 6795fda9500a..071df5073a06 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -23,7 +23,7 @@ TiDB 版本:8.4.0 - 可扩展性和性能 + 可扩展性和性能 实例级执行计划缓存(实验特性)**tw@Oreoxmt 1569** 实例级执行计划缓存允许同一个 TiDB 实例的所有会话共享执行计划缓存,通过在内存中缓存更多执行计划,消除 SQL 编译时间,从而减少 SQL 运行时间,提升 OLTP 系统的性能和吞吐,同时更好地控制内存使用,提升数据库稳定性。 From 721e5feb588f64fff45e8a7f03bc726936e433f8 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Fri, 27 Sep 2024 18:42:05 +0800 Subject: [PATCH 100/127] Apply suggestions from code review --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 43ce98989eb3..7bf7ce5e87a5 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -67,8 +67,8 @@ TiDB 版本:8.4.0 将 CPU 时间合入系统表中展示,与会话或 SQL 的其他指标并列,方便你从多角度对高 CPU 消耗的操作进行观测,提升诊断效率。尤其适用于诊断实例 CPU 飙升或集群读写热点等场景。 - 按表或数据库聚合 TiKV 的 CPU 时间**tw@lilin90 1878** - 当热点问题不是由个别 SQL 语句引起时,利用 TOP SQL 中按表或者数据库聚合的 CPU 时间,能够协助用户快速发现造成热点的表或者应用程序。大大提升热点问题和 CPU 消耗问题的诊断效率。 + 按表或数据库维度聚合 TiKV 消耗的 CPU 时间**tw@lilin90 1878** + 当热点问题不是由个别 SQL 语句引起时,利用 TOP SQL 中按表或者数据库聚合的 CPU 时间,能够协助用户快速发现造成热点的表或者应用程序,从而大大提升热点问题和 CPU 消耗问题的诊断效率。 支持对开启了 IMDSv2 服务的 TiKV 实例做备份**tw@hfxsd 1945** From 896fb9ddaa551ef39d57cbf532d9c71e98ae8b7a Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 12:30:28 +0800 Subject: [PATCH 101/127] add a contributor for vector search Co-authored-by: JaySon --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 7bf7ce5e87a5..ea4bc70fe852 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -204,7 +204,7 @@ TiDB 版本:8.4.0 ### SQL 功能 -* 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) @[winoros](https://github.com/winoros) **tw@qiancai** +* 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) @[winoros](https://github.com/winoros) @[wk989898](https://github.com/wk989898) **tw@qiancai** 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 From c2af72aaa5087ac5abdbeb15a577dbf789706e2d Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 12:33:06 +0800 Subject: [PATCH 102/127] improvements: add TiDB and TiFlash Co-authored-by: Zhou Kunqin <25057648+time-and-fate@users.noreply.github.com> Co-authored-by: JaySon --- releases/release-8.4.0.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index ea4bc70fe852..005638dd49f3 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -372,6 +372,12 @@ TiDB 版本:8.4.0 - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - 自动统计信息收集根据节点规模和硬件规格自动确定执行和扫描的并发度 [#53460](https://github.com/pingcap/tidb/issues/53460) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + - 优化一处内部函数逻辑,提升查询列数特别多的表时的性能 [#52112](https://github.com/pingcap/tidb/issues/52112) @[Rustin170506](https://github.com/Rustin170506) + - 默认开启 `tidb_enable_inl_join_inner_multi_pattern`,扩展 TiDB Index Join 的能力 [#47233](https://github.com/pingcap/tidb/issues/47233) @[winoros](https://github.com/winoros) + - 支持将形如 `a = 1 AND (a > 1 OR (a = 1 AND b = 2))` 的过滤条件简化为 `a = 1 AND b = 2` [#56005](https://github.com/pingcap/tidb/issues/56005) @[ghazalfamilyusa](https://github.com/ghazalfamilyusa) + - 在部分选中不优执行计划风险较高的场景中,提高代价模型中 Table Scan 的代价,使得优化器更倾向于使用索引 [#56012](https://github.com/pingcap/tidb/issues/56012) @[terry1purcell](https://github.com/terry1purcell) + - `MID` 函数支持两个参数的形式 [#52420](https://github.com/pingcap/tidb/issues/52420) @[dveeden](https://github.com/dveeden) + - 支持 `date_add`, `date_sub` 函数下推给 TiKV [#56297](https://github.com/pingcap/tidb/issues/56297) @[gengliqi](https://github.com/gengliqi) + TiKV @@ -390,6 +396,9 @@ TiDB 版本:8.4.0 - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) - (dup): release-6.5.11.md > 改进提升> TiFlash - 优化 `LENGTH()` 和 `ASCII()` 函数执行效率 [#9344](https://github.com/pingcap/tiflash/issues/9344) @[xzhangxian1008](https://github.com/xzhangxian1008) + - 减少处理存算分离请求创建的线程数 [#9334](https://github.com/pingcap/tiflash/issues/9334) @[JinheLin](https://github.com/JinheLin) + - 改进 pipeline 执行模型下 task 等待机制 [#8869](https://github.com/pingcap/tiflash/issues/8869) @[SeaRise](https://github.com/SeaRise) + - 改进 join 算子的 cancel 机制,使得 join 算子内部能及时响应 cancel 请求 [#9430](https://github.com/pingcap/tiflash/issues/9430) @[windtalker](https://github.com/windtalker) + Tools From ee493df7bea8fd072cc7e24867d0dd11e60267a2 Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 12:34:28 +0800 Subject: [PATCH 103/127] bug fix: add TiDB Co-authored-by: Zhou Kunqin <25057648+time-and-fate@users.noreply.github.com> --- releases/release-8.4.0.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 005638dd49f3..4f2f16bf2bbe 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -438,6 +438,16 @@ TiDB 版本:8.4.0 + TiDB - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - 修复一张表索引中包含生成列时,`ANALYZE` 这张表可能报错 “Unknown column 'column_name' in 'expression'” 的问题 [#55438](https://github.com/pingcap/tidb/issues/55438) @[hawkingrei](https://github.com/hawkingrei) + - 将 `analyze-partition-concurrency-quota` 配置文件参数标记为废弃 [#55043](https://github.com/pingcap/tidb/issues/55043) @[Rustin170506](https://github.com/Rustin170506) + - 修复执行一条包含关联子查询和 CTE 的查询时,TiDB 可能 hang 住或返回错误结果的问题 [#55551](https://github.com/pingcap/tidb/issues/55551) @[guo-shaoge](https://github.com/guo-shaoge) + - 修复禁用 `lite-init-stats` 可能导致统计信息同步加载失败的问题 [#54532](https://github.com/pingcap/tidb/issues/54532) @[hawkingrei](https://github.com/hawkingrei) + - 修复当 `UPDATE` 或 `DELETE` 语句包含 Recursive CTE 时,语句可能报错或不生效的问题 [#55666](https://github.com/pingcap/tidb/issues/55666) @[time-and-fate](https://github.com/time-and-fate) + - 修复当一条 SQL Binding 涉及窗口函数时,有一定概率不生效的问题 [#55981](https://github.com/pingcap/tidb/issues/55981) @[winoros](https://github.com/winoros) + - 修复统计信息初始化时,使用非二进制排序规则的字符串类型列的统计信息可能无法正常加载的问题 [#55684](https://github.com/pingcap/tidb/issues/55684) @[winoros](https://github.com/winoros) + - 修复查询条件为 `column IS NULL` 访问唯一索引的时候,优化器将行数错误地估算为 1 的问题 [#56116](https://github.com/pingcap/tidb/issues/56116) @[hawkingrei](https://github.com/hawkingrei) + - 修复了当查询包含形如 `(... AND ...) OR (... AND ...) ...` 的过滤条件时,优化器没有使用最优的多列统计信息进行行数估算的问题。 [#54323](https://github.com/pingcap/tidb/issues/54323) @[time-and-fate](https://github.com/time-and-fate) + - 修复当一个查询有 Index Merge 执行计划可用时,`read_from_storage` hint 可能不生效的问题 [#56217](https://github.com/pingcap/tidb/issues/56217) @[AilinKid](https://github.com/AilinKid) - (dup): release-6.5.11.md > 错误修复> TiDB - 修复 `IndexNestedLoopHashJoin` 中存在数据竞争的问题 [#49692](https://github.com/pingcap/tidb/issues/49692) @[solotzg](https://github.com/solotzg) - (dup): release-6.5.11.md > 错误修复> TiDB - 修复 `INFORMATION_SCHEMA.STATISTICS` 表中 `SUB_PART` 值为空的问题 [#55812](https://github.com/pingcap/tidb/issues/55812) @[Defined2014](https://github.com/Defined2014) - (dup): release-6.5.11.md > 错误修复> TiDB - 修复 DML 语句中包含嵌套的生成列时报错的问题 [#53967](https://github.com/pingcap/tidb/issues/53967) @[wjhuang2016](https://github.com/wjhuang2016) From 221df316d6c8841e0b0f7dd742e2d92c77540207 Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 12:34:52 +0800 Subject: [PATCH 104/127] bug fix: add TiFlash Co-authored-by: JaySon --- releases/release-8.4.0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 4f2f16bf2bbe..409703938580 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -467,7 +467,9 @@ TiDB 版本:8.4.0 + TiFlash - note [#issue](https://github.com/pingcap/tiflash/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) - - note [#issue](https://github.com/pingcap/tiflash/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - 修复当表里含 Bit 类型列并且带有表示非法字符的默认值时 TiFlash 无法解析表 schema 的问题 [#9461](https://github.com/pingcap/tiflash/issues/9461) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) + - 修复当多个 Region 在并发进行副本同步时,可能错误地触发 Region overlap 检查失败引起的 panic 问题 [#9329](https://github.com/pingcap/tiflash/issues/9329) @[CalvinNeo](https://github.com/CalvinNeo) + - 修复一些 TiFlash 不支持的 json 函数下推给 TiFlash 的问题 [#9444](https://github.com/pingcap/tiflash/issues/9444) @[windtalker](https://github.com/windtalker) + Tools From 830ed7084d6ab82be2cf502e0a836c17d86e745e Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 12:42:16 +0800 Subject: [PATCH 105/127] bug fix: add TiDB Co-authored-by: xufei --- releases/release-8.4.0.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 409703938580..3e880286c8bb 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -451,6 +451,9 @@ TiDB 版本:8.4.0 - (dup): release-6.5.11.md > 错误修复> TiDB - 修复 `IndexNestedLoopHashJoin` 中存在数据竞争的问题 [#49692](https://github.com/pingcap/tidb/issues/49692) @[solotzg](https://github.com/solotzg) - (dup): release-6.5.11.md > 错误修复> TiDB - 修复 `INFORMATION_SCHEMA.STATISTICS` 表中 `SUB_PART` 值为空的问题 [#55812](https://github.com/pingcap/tidb/issues/55812) @[Defined2014](https://github.com/Defined2014) - (dup): release-6.5.11.md > 错误修复> TiDB - 修复 DML 语句中包含嵌套的生成列时报错的问题 [#53967](https://github.com/pingcap/tidb/issues/53967) @[wjhuang2016](https://github.com/wjhuang2016) + - 修复带有最小显示宽度的 integer 数据类型参与除法时,可能导致除法结果溢出的问题 [#55837](https://github.com/pingcap/tidb/issues/55837) @[windtalker](https://github.com/windtalker) + - 修复 TopN 算子之后的算子无法在内存超限时触发数据落盘的问题 [#56185](https://github.com/pingcap/tidb/issues/56185) @[xzhangxian1008](https://github.com/xzhangxian1008) + - 修复 sort 算子中 order by 列如果包含常量列会 hang 住的问题 [#55344](https://github.com/pingcap/tidb/issues/55344) @[xzhangxian1008](https://github.com/xzhangxian1008) + TiKV From 70e8afc8ec7991952180bc207715e9e9539ea37c Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 12:44:13 +0800 Subject: [PATCH 106/127] bug fix: add TiDB and BR; improvement: add TiKV Co-authored-by: Hangjie Mo Co-authored-by: Neil Shen Co-authored-by: Jianjun Liao <36503113+Leavrth@users.noreply.github.com> --- releases/release-8.4.0.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 3e880286c8bb..003389ab3ca9 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -378,6 +378,10 @@ TiDB 版本:8.4.0 - 在部分选中不优执行计划风险较高的场景中,提高代价模型中 Table Scan 的代价,使得优化器更倾向于使用索引 [#56012](https://github.com/pingcap/tidb/issues/56012) @[terry1purcell](https://github.com/terry1purcell) - `MID` 函数支持两个参数的形式 [#52420](https://github.com/pingcap/tidb/issues/52420) @[dveeden](https://github.com/dveeden) - 支持 `date_add`, `date_sub` 函数下推给 TiKV [#56297](https://github.com/pingcap/tidb/issues/56297) @[gengliqi](https://github.com/gengliqi) + - 修复在设置 `tidb_restricted_read_only` 变量为 `true` 的时候有概率死锁的问题 [#53822](https://github.com/pingcap/tidb/issues/53822) [#55373](https://github.com/pingcap/tidb/issues/55373) @[Defined2014](https://github.com/Defined2014) + - 修复 TiDB graceful shutdown 时不等待 auto commit 事务完成的问题 [#55464](https://github.com/pingcap/tidb/issues/55464) @[YangKeao](https://github.com/YangKeao) + - 修复在 TTL 任务执行过程中降低 `tidb_ttl_delete_worker_count` 的值导致任务不会完成的问题 [#55561](https://github.com/pingcap/tidb/issues/55561) @[lcwangchao](https://github.com/lcwangchao) + - 支持对主键为非 binary 类型的表拆分 TTL 任务 [#55660](https://github.com/pingcap/tidb/issues/55660) @[lcwangchao](https://github.com/lcwangchao) + TiKV @@ -386,6 +390,11 @@ TiDB 版本:8.4.0 - 支持指定单个 Region 或 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多的情况下,可以通过修改配置提高内存上限,避免悲观锁落盘导致的 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@Oreoxmt** - Raft Engine 新增 `spill-dir` 配置,支持 Raft 日志的多磁盘存储。当主目录 `dir` 所在磁盘的容量不足时,Raft Engine 会自动将新日志写入 `spill-dir`,从而确保系统的持续运行。[LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - (dup): release-6.5.11.md > 改进提升> TiKV - 优化存在大量 DELETE 版本时 RocksDB 的 compaction 触发机制,以加快磁盘空间回收 [#17269](https://github.com/tikv/tikv/issues/17269) @[AndreMouche](https://github.com/AndreMouche) + - 支持向量数据类型(VECTOR)及其相关函数的计算下推 [#17290]https://github.com/tikv/tikv/issues/17290 @[breezewish](https://github.com/breezewish) + - 支持 `date_add`/`date_sub` 函数的计算下推 [#17529](https://github.com/tikv/tikv/issues/17529) @[gengliqi](https://github.com/gengliqi) + - 支持在线更改流控(flow-control)相关配置 [#17395](https://github.com/tikv/tikv/issues/17395) @[glorv](https://github.com/glorv) + - 优化空表和小 region 场景下的 Region Merge 的速度 [#17376](https://github.com/tikv/tikv/issues/17376) @[LykxSassinator](https://github.com/LykxSassinator) + - 支持 gb18030 字符集和 gb18030_bin、gb18030_chinese_ci 排序规则 [#17470](https://github.com/tikv/tikv/issues/17470) @[CbcWestwolf](https://github.com/CbcWestwolf) + PD @@ -407,6 +416,7 @@ TiDB 版本:8.4.0 - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) - 当集群的 `split-table` 和 `split-region-on-table` 配置项为默认值 `false` 时,BR 在恢复数据到该集群的过程中不会按照 table 分裂 Region,以提升恢复速度 [#53532](https://github.com/pingcap/tidb/issues/53532) @[Leavrth](https://github.com/Leavrth) **tw@qiancai** - 默认不支持使用 SQL 语句 `RESTORE` 全量恢复数据到非空集群 [#55087](https://github.com/pingcap/tidb/issues/55087) @[BornChanger](https://github.com/BornChanger) **tw@Oreoxmt** + - 修复当 TiDB 节点停止时,监控中 PITR checkpoint 间隔大幅增量但与实际情况不符合的问题 [#42419](https://github.com/pingcap/tidb/issues/42419) @[YuJuncen](https://github.com/YuJuncen) + TiCDC From c476b2e51122a31e8e56b0ef5e0e1a118522f8b7 Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 12:44:42 +0800 Subject: [PATCH 107/127] improvement: add TiKV Co-authored-by: ekexium --- releases/release-8.4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 003389ab3ca9..e7c35c770f44 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -395,6 +395,7 @@ TiDB 版本:8.4.0 - 支持在线更改流控(flow-control)相关配置 [#17395](https://github.com/tikv/tikv/issues/17395) @[glorv](https://github.com/glorv) - 优化空表和小 region 场景下的 Region Merge 的速度 [#17376](https://github.com/tikv/tikv/issues/17376) @[LykxSassinator](https://github.com/LykxSassinator) - 支持 gb18030 字符集和 gb18030_bin、gb18030_chinese_ci 排序规则 [#17470](https://github.com/tikv/tikv/issues/17470) @[CbcWestwolf](https://github.com/CbcWestwolf) + - Pipelined DML 不会长时间阻塞 resolved-ts。 [#17459](https://github.com/tikv/tikv/issues/17459)@[ekexium](https://github.com/ekexium) + PD From c5616c518f0c88aedef324265f22851b9a37542f Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 14:24:49 +0800 Subject: [PATCH 108/127] improvement & bug fix: add TiDB, DM, and TiDB Lightning Co-authored-by: Zack Zhao <57036248+joccau@users.noreply.github.com> --- releases/release-8.4.0.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index e7c35c770f44..ee9e828c24b8 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -382,6 +382,9 @@ TiDB 版本:8.4.0 - 修复 TiDB graceful shutdown 时不等待 auto commit 事务完成的问题 [#55464](https://github.com/pingcap/tidb/issues/55464) @[YangKeao](https://github.com/YangKeao) - 修复在 TTL 任务执行过程中降低 `tidb_ttl_delete_worker_count` 的值导致任务不会完成的问题 [#55561](https://github.com/pingcap/tidb/issues/55561) @[lcwangchao](https://github.com/lcwangchao) - 支持对主键为非 binary 类型的表拆分 TTL 任务 [#55660](https://github.com/pingcap/tidb/issues/55660) @[lcwangchao](https://github.com/lcwangchao) + - 优化与系统元数据相关的语句性能 [#50305](https://github.com/pingcap/tidb/issues/50305) @[ywqzzy](https://github.com/ywqzzy) @[tangenta](https://github.com/tangenta) @[joechenrh](https://github.com/joechenrh) @[CbcWestwolf](https://github.com/CbcWestwolf) + - 实现新的优先级队列以提高性能并减少重建自动分析操作队列的开销 [#55906](https://github.com/pingcap/tidb/issues/55906) @[Rustin170506](https://github.com/Rustin170506) + - 引入 DDL 通知程序,以允许统计模块订阅 DDL 事件 [#55722](https://github.com/pingcap/tidb/issues/55722) @[fzzf678](https://github.com/fzzf678) @[lance6716](https://github.com/lance6716) @[Rustin170506](https://github.com/Rustin170506) + TiKV @@ -465,6 +468,12 @@ TiDB 版本:8.4.0 - 修复带有最小显示宽度的 integer 数据类型参与除法时,可能导致除法结果溢出的问题 [#55837](https://github.com/pingcap/tidb/issues/55837) @[windtalker](https://github.com/windtalker) - 修复 TopN 算子之后的算子无法在内存超限时触发数据落盘的问题 [#56185](https://github.com/pingcap/tidb/issues/56185) @[xzhangxian1008](https://github.com/xzhangxian1008) - 修复 sort 算子中 order by 列如果包含常量列会 hang 住的问题 [#55344](https://github.com/pingcap/tidb/issues/55344) @[xzhangxian1008](https://github.com/xzhangxian1008) + - 修复在添加索引期间,kill pd leader 后出现“错误 8223 (HY000),且表中的数据不一致的问题 [#55488](https://github.com/pingcap/tidb/issues/55488) @[tangenta](https://github.com/tangenta) + - 修复当用户请求历史 DDL 任务信息时,DDL 历史任务过多导致 OOM 的问题 [#55711](https://github.com/pingcap/tidb/issues/55711)) @[joccau](https://github.com/joccau) + - 修复当 Region 大小超过 96M 时,全局有序 IMPORT INTO 卡住的问题 [#55374](https://github.com/pingcap/tidb/issues/55374) @[lance6716](https://github.com/lance6716) + - 修复在临时表上使用 `import into` 会导致 tidb crash 的问题 [#55970](https://github.com/pingcap/tidb/issues/55970) @[D3Hunter](https://github.com/D3Hunter) + - 修复添加唯一索引意外地报告 duplicate entry 错误的问题 [#56161](https://github.com/pingcap/tidb/issues/56161) @[tangenta](https://github.com/tangenta) + - 修复当 TiKV 停机超过 810 秒后时,Lightning 未摄取所有 KV 对导致表中数据不一致的问题 [#55808](https://github.com/pingcap/tidb/issues/55808) @[lance6716](https://github.com/lance6716) + TiKV @@ -500,12 +509,12 @@ TiDB 版本:8.4.0 + TiDB Data Migration (DM) - - note [#issue](https://github.com/pingcap/tiflow/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - 修复多个 dm-master 同时成为 Leader 的问题 [#11602](https://github.com/pingcap/tiflow/issues/11602) @[GMHDBJD](https://github.com/GMHDBJD) - (dup): release-6.5.11.md > 错误修复> Tools> TiDB Data Migration (DM) - 修复 DM 在处理 `ALTER DATABASE` 语句时未设置默认数据库导致同步报错的问题 [#11503](https://github.com/pingcap/tiflow/issues/11503) @[lance6716](https://github.com/lance6716) + TiDB Lightning - - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) + - 修复使用并行导入并且具有相同的任务 ID 时,lightning 会报告 `verify allocator base failed` 错误的问题 [#55384](https://github.com/pingcap/tidb/issues/55384) @[ei-sugimoto](https://github.com/ei-sugimoto) + Dumpling From 2dfc9768dd53c002ddcbf0cd7fffa18bb4957598 Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 15:37:23 +0800 Subject: [PATCH 109/127] add DDL Owner during TiDB upgrade Co-authored-by: Frank945946 <108602632+Frank945946@users.noreply.github.com> --- releases/release-8.4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index ee9e828c24b8..8f7f433cecab 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -385,6 +385,7 @@ TiDB 版本:8.4.0 - 优化与系统元数据相关的语句性能 [#50305](https://github.com/pingcap/tidb/issues/50305) @[ywqzzy](https://github.com/ywqzzy) @[tangenta](https://github.com/tangenta) @[joechenrh](https://github.com/joechenrh) @[CbcWestwolf](https://github.com/CbcWestwolf) - 实现新的优先级队列以提高性能并减少重建自动分析操作队列的开销 [#55906](https://github.com/pingcap/tidb/issues/55906) @[Rustin170506](https://github.com/Rustin170506) - 引入 DDL 通知程序,以允许统计模块订阅 DDL 事件 [#55722](https://github.com/pingcap/tidb/issues/55722) @[fzzf678](https://github.com/fzzf678) @[lance6716](https://github.com/lance6716) @[Rustin170506](https://github.com/Rustin170506) + - TiDB 升级期间强制新版 TiDB 本节点接管 DDL Owner,避免旧版本 TiDB 节点接管而引发的一些兼容性问题 [#51285](https://github.com/pingcap/tidb/pull/51285) @[wjhuang2016](https://github.com/wjhuang2016) + TiKV From 1b139e72ee4df2cfdb5d70e094f6c579346b0dad Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 15:38:47 +0800 Subject: [PATCH 110/127] Apply suggestions from code review Co-authored-by: Grace Cai --- releases/release-8.4.0.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 8f7f433cecab..7a237be560f8 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -25,7 +25,7 @@ TiDB 版本:8.4.0 可扩展性和性能 实例级执行计划缓存(实验特性)**tw@Oreoxmt 1569** - 实例级执行计划缓存允许同一个 TiDB 实例的所有会话共享执行计划缓存,通过在内存中缓存更多执行计划,消除 SQL 编译时间,从而减少 SQL 运行时间,提升 OLTP 系统的性能和吞吐,同时更好地控制内存使用,提升数据库稳定性。 + 实例级执行计划缓存允许同一个 TiDB 实例的所有会话共享执行计划缓存。该特性通过在内存中缓存更多执行计划,减少 SQL 编译时间,从而降低 SQL 整体运行时间,提升 OLTP 系统的性能和吞吐,同时更好地控制内存使用,提升数据库稳定性。 分区表全局索引成为正式功能**tw@hfxsd 1961** @@ -115,14 +115,14 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/functions-and-operators/expressions-pushed-down.md)。 -* 实例级执行计划缓存(实验特性)[#54057](https://github.com/pingcap/tidb/issues/54057) @[qw4990](https://github.com/qw4990) **tw@Oreoxmt** +* 支持实例级执行计划缓存(实验特性)[#54057](https://github.com/pingcap/tidb/issues/54057) @[qw4990](https://github.com/qw4990) **tw@Oreoxmt** - TiDB v8.4.0 引入实例级执行计划缓存作为实验特性。该功能允许同一个 TiDB 实例的所有会话共享执行计划缓存,能够大幅降低 TiDB 的时延、提升集群吞吐、减少执行计划突变的可能性、保持集群性能的稳定,是 TiDB 改善性能和稳定性的重要改进。相比会话级执行计划缓存,实例级执行计划缓存具有以下优势: + 实例级执行计划缓存允许同一个 TiDB 实例上的所有会话共享执行计划缓存。该功能可以大幅降低 TiDB 的查询响应时间,提升集群吞吐,减少执行计划突变的可能性,并保持集群性能的稳定。相比会话级执行计划缓存,实例级执行计划缓存具有以下优势: - 消除冗余,在相同的内存消耗下缓存更多执行计划。 - 在实例上分配固定大小的内存区域,更有效地限制内存使用。 - 在 v8.4.0 中,实例级执行计划缓存仅支持对查询的执行计划进行缓存,默认关闭。你可以通过系统变量 [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入) 开启该功能,并通过系统变量 [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) 设置其最大内存使用量。开启该功能之前,请关闭关闭会话级别的 [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md)和[非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 + 在 v8.4.0 中,实例级执行计划缓存仅支持对查询的执行计划进行缓存,且默认关闭。你可以通过系统变量 [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入) 开启该功能,并通过系统变量 [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) 设置其最大内存使用量。开启该功能之前,请关闭会话级别的 [Prepare 语句执行计划缓存](/sql-prepared-plan-cache.md)和[非 Prepare 语句执行计划缓存](/sql-non-prepared-plan-cache.md)。 更多信息,请参考[用户文档](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)。 @@ -189,7 +189,7 @@ TiDB 版本:8.4.0 * TiProxy 支持流量回放功能(实验特性)[#642](https://github.com/pingcap/tiproxy/issues/642) @[djshow832](https://github.com/djshow832) **tw@Oreoxmt** - 从 TiProxy v1.3.0 开始,你可以使用 TiProxy 捕获 TiDB 生产集群中的访问流量,并在测试集群中按照指定的速率回放这些流量。通过该功能,你可以在测试环境中重现生产集群的实际工作负载,从而验证所有 SQL 的执行结果和性能表现。 + 从 TiProxy v1.3.0 开始,你可以使用 `tiproxyctrl` 连接 TiProxy 实例,捕获 TiDB 生产集群中的访问流量,并在测试集群中按照指定的速率回放这些流量。通过该功能,你可以在测试环境中重现生产集群的实际工作负载,从而验证所有 SQL 的执行结果和性能表现。 流量回放适用于以下场景: @@ -198,8 +198,6 @@ TiDB 版本:8.4.0 - TiDB 扩缩容前性能验证 - 集群性能上限测试 - 你可以使用 `tiproxyctrl` 连接 TiProxy 实例,并进行流量捕获和回放。 - 更多信息,请参考[用户文档](/tiproxy/tiproxy-traffic-replay.md)。 ### SQL 功能 @@ -240,7 +238,7 @@ TiDB 版本:8.4.0 * BR 降低了从云存储服务系统恢复数据的权限要求 [#55870](https://github.com/pingcap/tidb/issues/55870) @[Leavrth](https://github.com/Leavrth) **tw@Oreoxmt** - 在 v8.4.0 之前,BR 在恢复过程中将恢复进度的检查点信息存储在备份数据位置。这些检查点使中断的恢复操作能够快速恢复。从 v8.4.0 开始,BR 将恢复检查点信息存储在目标 TiDB 集群中。这意味着 BR 在恢复时只需要对备份目录的读取权限。 + 在 v8.4.0 之前,BR 在恢复过程中会将恢复进度的检查点信息写入到备份存储系统。当恢复过程出现中断时,这些检查点使中断的恢复操作能够快速恢复。从 v8.4.0 开始,BR 将恢复检查点信息写入到目标 TiDB 集群中。这意味着 BR 在恢复时只需要具备对备份目录的读取权限。 更多信息,请参考[用户文档](/br/backup-and-restore-storages.md#鉴权)。 @@ -274,9 +272,9 @@ TiDB 版本:8.4.0 ### 数据迁移 -* TiCDC Claim-Check 支持仅发送Kafka 消息的 `value` 部分到外部存储 [#11396](https://github.com/pingcap/tiflow/issues/11396) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** +* TiCDC Claim-Check 支持仅发送 Kafka 消息的 `value` 部分到外部存储 [#11396](https://github.com/pingcap/tiflow/issues/11396) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** - 在 v8.4.0 之前,使用 Claim-Check 功能处理大型消息时(将 `large-message-handle-option` 设置为 `claim-check`),TiCDC 会将 `key` 和 `value` 都编码并存储在外部存储系统中。 + 在 v8.4.0 之前,如果开启了 Claim-Check 功能 (将 `large-message-handle-option` 设置为 `claim-check`),TiCDC 在处理大型消息时会将 `key` 和 `value` 都进行编码并存储在外部存储系统中。 从 v8.4.0 开始,TiCDC 支持仅将 Kafka 消息的 `value` 部分发送到外部存储,该功能仅适用于非 Open Protocol 协议。你可以通过设置 `claim-check-raw-value` 参数控制是否开启该功能。 @@ -284,7 +282,7 @@ TiDB 版本:8.4.0 * TiCDC 引入 Checksum V2 算法校验 Update 或 Delete 事件中 Old Value 数据 [#10969](https://github.com/pingcap/tiflow/issues/10969) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** - 从 v8.4.0 开始,TiDB 和 TiCDC 引入 Checksum V2 算法,解决了 Checksum V1 在执行 Add Column 或 Drop Column 后无法正确校验 Update 或 Delete 事件中 Old Value 数据的问题。对于 v8.4.0 及之后新创建的集群,或从之前版本升级到 v8.4.0 的集群,启用单行数据 Checksum 正确性校验功能后,TiDB 默认使用 Checksum V2 算法进行 Checksum 计算和校验。TiCDC 支持同时处理 V1 和 V2 两种 Checksum。该变更仅影响 TiDB 和 TiCDC 内部实现,不影响下游 Kafka consumer 的 Checksum 计算校验方法。 + 从 v8.4.0 开始,TiDB 和 TiCDC 引入 Checksum V2 算法,解决了 Checksum V1 在执行 `ADD COLUMN` 或 `DROP COLUMN` 后无法正确校验 Update 或 Delete 事件中 Old Value 数据的问题。对于 v8.4.0 及之后新创建的集群,或从之前版本升级到 v8.4.0 的集群,启用单行数据 Checksum 正确性校验功能后,TiDB 默认使用 Checksum V2 算法进行 Checksum 计算和校验。TiCDC 支持同时处理 V1 和 V2 两种 Checksum。该变更仅影响 TiDB 和 TiCDC 内部实现,不影响下游 Kafka consumer 的 Checksum 计算校验方法。 更多信息,请参考[用户文档](/ticdc/ticdc-integrity-check.md)。 @@ -366,7 +364,7 @@ TiDB 版本:8.4.0 - 优化扫描大量数据时构造 BatchCop Task 的效率 [#55915](https://github.com/pingcap/tidb/issues/55915) [#55413](https://github.com/pingcap/tidb/issues/55413) @[wshwsh12](https://github.com/wshwsh12) **tw@caiqian** - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** - 优化系统变量 `tidb_dml_type` 为 `"bulk"` 时 DML 语句的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制是否将优化器为 `estRows` 估算的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** + - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制优化器是否将 `estRows` 的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低大量并发写入引发的开销 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** @@ -391,7 +389,7 @@ TiDB 版本:8.4.0 - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) - Region 的默认值由 96 MiB 提升到 256 MiB,避免 Region 数量过多导致额外开销 [#17309](https://github.com/tikv/tikv/issues/17309) [LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - - 支持指定单个 Region 或 TiKV 实例的内存悲观锁的内存上限,在热点写悲观锁加锁较多的情况下,可以通过修改配置提高内存上限,避免悲观锁落盘导致的 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@Oreoxmt** + - 支持指定单个 Region 或 TiKV 实例的内存悲观锁的内存上限,在热点写导致大量悲观锁加锁时,可以通过修改配置提高内存上限,避免悲观锁落盘导致的 CPU/IO 开销 [#17542](https://github.com/tikv/tikv/issues/17542) @[cfzjywxk](https://github.com/cfzjywxk) **tw@Oreoxmt** - Raft Engine 新增 `spill-dir` 配置,支持 Raft 日志的多磁盘存储。当主目录 `dir` 所在磁盘的容量不足时,Raft Engine 会自动将新日志写入 `spill-dir`,从而确保系统的持续运行。[LykxSassinator](https://github.com/LykxSassinator) **tw@hfxsd** - (dup): release-6.5.11.md > 改进提升> TiKV - 优化存在大量 DELETE 版本时 RocksDB 的 compaction 触发机制,以加快磁盘空间回收 [#17269](https://github.com/tikv/tikv/issues/17269) @[AndreMouche](https://github.com/AndreMouche) - 支持向量数据类型(VECTOR)及其相关函数的计算下推 [#17290]https://github.com/tikv/tikv/issues/17290 @[breezewish](https://github.com/breezewish) From 6ac806c35649efcef2d4f73f4f5427524f600eee Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 15:39:06 +0800 Subject: [PATCH 111/127] Apply suggestions from code review Co-authored-by: Zack Zhao <57036248+joccau@users.noreply.github.com> --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 7a237be560f8..67e76d169bf4 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -467,7 +467,7 @@ TiDB 版本:8.4.0 - 修复带有最小显示宽度的 integer 数据类型参与除法时,可能导致除法结果溢出的问题 [#55837](https://github.com/pingcap/tidb/issues/55837) @[windtalker](https://github.com/windtalker) - 修复 TopN 算子之后的算子无法在内存超限时触发数据落盘的问题 [#56185](https://github.com/pingcap/tidb/issues/56185) @[xzhangxian1008](https://github.com/xzhangxian1008) - 修复 sort 算子中 order by 列如果包含常量列会 hang 住的问题 [#55344](https://github.com/pingcap/tidb/issues/55344) @[xzhangxian1008](https://github.com/xzhangxian1008) - - 修复在添加索引期间,kill pd leader 后出现“错误 8223 (HY000),且表中的数据不一致的问题 [#55488](https://github.com/pingcap/tidb/issues/55488) @[tangenta](https://github.com/tangenta) + - 修复在添加索引期间,kill pd leader 后出现`8223 (HY000)`错误 ,且表中的数据不一致的问题 [#55488](https://github.com/pingcap/tidb/issues/55488) @[tangenta](https://github.com/tangenta) - 修复当用户请求历史 DDL 任务信息时,DDL 历史任务过多导致 OOM 的问题 [#55711](https://github.com/pingcap/tidb/issues/55711)) @[joccau](https://github.com/joccau) - 修复当 Region 大小超过 96M 时,全局有序 IMPORT INTO 卡住的问题 [#55374](https://github.com/pingcap/tidb/issues/55374) @[lance6716](https://github.com/lance6716) - 修复在临时表上使用 `import into` 会导致 tidb crash 的问题 [#55970](https://github.com/pingcap/tidb/issues/55970) @[D3Hunter](https://github.com/D3Hunter) From 142e6c8c0e07a958bea4c116400b605970056fa5 Mon Sep 17 00:00:00 2001 From: Aolin Date: Sun, 29 Sep 2024 15:45:38 +0800 Subject: [PATCH 112/127] update tidb_enable_inl_join_inner_multi_pattern Co-authored-by: Grace Cai --- releases/release-8.4.0.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 67e76d169bf4..9a5299f9676c 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -366,12 +366,11 @@ TiDB 版本:8.4.0 - 优化系统变量 `tidb_dml_type` 为 `"bulk"` 时 DML 语句的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制优化器是否将 `estRows` 的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低大量并发写入引发的开销 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - - 当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join [#issue号](链接) @[winoros](https://github.com/winoros) **tw@Oreoxmt** + - 当内表上有 `Selection`、`Projection` 或 `Aggregation` 算子时默认支持 Index Join [#47233](https://github.com/pingcap/tidb/issues/47233) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - 自动统计信息收集根据节点规模和硬件规格自动确定执行和扫描的并发度 [#53460](https://github.com/pingcap/tidb/issues/53460) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** - 优化一处内部函数逻辑,提升查询列数特别多的表时的性能 [#52112](https://github.com/pingcap/tidb/issues/52112) @[Rustin170506](https://github.com/Rustin170506) - - 默认开启 `tidb_enable_inl_join_inner_multi_pattern`,扩展 TiDB Index Join 的能力 [#47233](https://github.com/pingcap/tidb/issues/47233) @[winoros](https://github.com/winoros) - 支持将形如 `a = 1 AND (a > 1 OR (a = 1 AND b = 2))` 的过滤条件简化为 `a = 1 AND b = 2` [#56005](https://github.com/pingcap/tidb/issues/56005) @[ghazalfamilyusa](https://github.com/ghazalfamilyusa) - 在部分选中不优执行计划风险较高的场景中,提高代价模型中 Table Scan 的代价,使得优化器更倾向于使用索引 [#56012](https://github.com/pingcap/tidb/issues/56012) @[terry1purcell](https://github.com/terry1purcell) - `MID` 函数支持两个参数的形式 [#52420](https://github.com/pingcap/tidb/issues/52420) @[dveeden](https://github.com/dveeden) From 0f87fff8f07c64c3c8b0fb9a423b66f2c4c61095 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Sun, 29 Sep 2024 16:41:48 +0800 Subject: [PATCH 113/127] Apply suggestions from code review Co-authored-by: Aolin --- releases/release-8.4.0.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 9a5299f9676c..ac0dcdd58222 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -58,8 +58,8 @@ TiDB 版本:8.4.0 SQL - >向量搜索功能(实验特性)**tw@qiancai 1898** - 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 + 支持向量搜索功能(实验特性)**tw@qiancai 1898** + 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型 (LLM) 的核心功能之一,向量搜索可用于检索增强生成 (Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 数据库管理和可观测性 @@ -76,7 +76,7 @@ TiDB 版本:8.4.0 安全 - 日志备份数据支持客户端加密(实验特性)**tw@qiancai 1920** + 日志备份数据支持客户端加密(实验特性)**tw@qiancai 1920** 在上传日志备份到备份存储之前,你可以对日志备份数据进行加密,确保数据在存储和传输过程中的安全性。 @@ -102,16 +102,18 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入)。 -* 优化 TiDB Hash Join 算子的执行效率(实验特性) [#55153](https://github.com/pingcap/tidb/issues/55153) [#53127](https://github.com/pingcap/tidb/issues/53127) @[windtalker](https://github.com/windtalker) @[xzhangxian1008](https://github.com/xzhangxian1008) @[XuHuaiyu](https://github.com/XuHuaiyu) @[wshwsh12](https://github.com/wshwsh12) **tw@qiancai** +* 优化 TiDB Hash Join 算子的执行效率(实验特性)[#55153](https://github.com/pingcap/tidb/issues/55153) [#53127](https://github.com/pingcap/tidb/issues/53127) @[windtalker](https://github.com/windtalker) @[xzhangxian1008](https://github.com/xzhangxian1008) @[XuHuaiyu](https://github.com/XuHuaiyu) @[wshwsh12](https://github.com/wshwsh12) **tw@qiancai** - 在 v8.4.0 中,TiDB 对 Hash Join 算子的实现方法进行了优化,以提升其执行效率。目前,优化版的 Hash Join 且仅对 Inner Join 和 Outer Join 操作生效,且默认关闭。如需开启优化版的 Hash Join,可以将系统变量 [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) 设置为 `optimized`。 + 在 v8.4.0 中,TiDB 对 Hash Join 算子的实现方法进行了优化,以提升其执行效率。目前,优化版的 Hash Join 仅对 Inner Join 和 Outer Join 操作生效,且默认关闭。如需开启优化版的 Hash Join,可以将系统变量 [`tidb_hash_join_version`](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) 设置为 `optimized`。 更多信息,请参考[用户文档](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入)。 -* 支持下推以下字符串函数到 TiKV [#17529](https://github.com/tikv/tikv/issues/17529) @[gengliqi](https://github.com/gengliqi) **tw@qiancai** +* 支持下推以下日期函数到 TiKV [#17529](https://github.com/tikv/tikv/issues/17529) @[gengliqi](https://github.com/gengliqi) **tw@qiancai** * `DATE_ADD()` * `DATE_SUB()` + * `ADDDATE()` + * `SUBDATE()` 更多信息,请参考[用户文档](/functions-and-operators/expressions-pushed-down.md)。 @@ -202,9 +204,9 @@ TiDB 版本:8.4.0 ### SQL 功能 -* 支持向量搜索功能(实验特性) [#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) @[winoros](https://github.com/winoros) @[wk989898](https://github.com/wk989898) **tw@qiancai** +* 支持向量搜索功能(实验特性)[#54245](https://github.com/pingcap/tidb/issues/54245) [#9032](https://github.com/pingcap/tiflash/issues/9032) @[breezewish](https://github.com/breezewish) @[Lloyd-Pottiger](https://github.com/Lloyd-Pottiger) @[EricZequan](https://github.com/EricZequan) @[zimulala](https://github.com/zimulala) @[JaySon-Huang](https://github.com/JaySon-Huang) @[winoros](https://github.com/winoros) @[wk989898](https://github.com/wk989898) **tw@qiancai** - 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型(LLM)的核心功能之一,向量搜索可用于检索增强生成(Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 + 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型 (LLM) 的核心功能之一,向量搜索可用于检索增强生成 (Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 从 v8.4.0 开始,TiDB 支持[向量数据类型](vector-search-data-types.md)和[向量搜索索引](vector-search-index.md),具备强大的向量搜索能力。TiDB 的向量数据类型最多可支持 16383 维度,并支持多种[距离函数](/vector-search-functions-and-operators.md#向量函数),包括 L2 距离(欧式距离)、余弦距离、负内积和 L1 距离(曼哈顿距离)。 From 1ee04d73d6b7b6501cc360aa43461b76e3071ea3 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Sun, 29 Sep 2024 16:46:15 +0800 Subject: [PATCH 114/127] Update releases/release-8.4.0.md Co-authored-by: Aolin --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index ac0dcdd58222..5550f72a0859 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -403,7 +403,7 @@ TiDB 版本:8.4.0 + PD - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) - - 支持 TiKV 节点在 TiDB Lightning 导入数据期间优雅下线 (graceful offline) [#7853](https://github.com/tikv/pd/issues/7853) @[okJiang](https://github.com/okJiang) **tw@qiancai** + - 支持 TiKV 节点在 TiDB Lightning 导入数据期间优雅下线 (graceful offline) [#7853](https://github.com/tikv/pd/issues/7853) @[okJiang](https://github.com/okJiang) **tw@qiancai** + TiFlash From 46c7b2b74f0fbc54d8c70c4d7e77d1285f76a0de Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 30 Sep 2024 13:07:56 +0800 Subject: [PATCH 115/127] add storage.format_version Co-authored-by: JaySon --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 5550f72a0859..d46a3d146b19 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -331,7 +331,7 @@ TiDB 版本:8.4.0 | TiKV | [`resource-control.priority-ctl-strategy`](/tikv-configuration-file.md#priority-ctl-strategy-从-v840-版本开始引入) | 新增 | 该配置文件参数用于配置低优先级任务的管控策略。TiKV 通过对低优先级的任务添加流量控制来确保优先执行更高优先级的任务。 | | PD | [`max-merge-region-keys`](/pd-configuration-file.md#max-merge-region-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `540000`。在 v8.4.0 之前,默认值为 `200000`。 | | PD | [`max-merge-region-size`](/pd-configuration-file.md#max-merge-region-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `54`。在 v8.4.0 之前,默认值为 `20`。 | - +| TiFlash | [`storage.format_version`](/tiflash/tiflash-configuration.md) | 修改 | 默认值从 `5` 修改为 `7`,该格式可以支持向量索引的构建与存储。 | ### 系统表 From ddd15dcbc9f467155cc2fcbc3e302909d92aef3f Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 30 Sep 2024 13:31:37 +0800 Subject: [PATCH 116/127] Apply suggestions from code review Co-authored-by: Grace Cai Co-authored-by: Roger Song --- releases/release-8.4.0.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index d46a3d146b19..a32e9524a499 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -25,7 +25,7 @@ TiDB 版本:8.4.0 可扩展性和性能 实例级执行计划缓存(实验特性)**tw@Oreoxmt 1569** - 实例级执行计划缓存允许同一个 TiDB 实例的所有会话共享执行计划缓存。该特性通过在内存中缓存更多执行计划,减少 SQL 编译时间,从而降低 SQL 整体运行时间,提升 OLTP 系统的性能和吞吐,同时更好地控制内存使用,提升数据库稳定性。 + 实例级执行计划缓存允许同一个 TiDB 实例的所有会话共享执行计划缓存。该特性通过在内存中缓存更多执行计划,减少 SQL 编译时间,从而降低 SQL 整体运行时间,提升 OLTP 的性能和吞吐,同时更好地控制内存使用,提升数据库稳定性。 分区表全局索引成为正式功能**tw@hfxsd 1961** @@ -53,8 +53,8 @@ TiDB 版本:8.4.0 在进行集群升级、迁移或部署变更等重要操作之前,使用 TiProxy 捕获 TiDB 生产集群的真实负载,并在测试的目标集群中重现该工作负载,从而验证性能,确保变更成功。 - 统计信息收集自适应并发度**tw@Oreoxmt 1739** - 自动统计信息收集会根据节点规模和硬件规格自动确定收集并发度,提高统计信息收集效率,减少手动调优,确保集群性能稳定。 + 自动统计信息任务支持并发**tw@Oreoxmt 1739** + 系统变量 tidb_auto_analyze_concurrency 控制单个自动统计信息收集任务内部的并发度,TiDB 会根据节点规模和硬件规格自动确定扫描任务的并发度。该功能通过充分利用系统资源,提高统计信息收集效率,从而减少手动调优,并确保集群性能稳定。 SQL @@ -371,7 +371,7 @@ TiDB 版本:8.4.0 - 当内表上有 `Selection`、`Projection` 或 `Aggregation` 算子时默认支持 Index Join [#47233](https://github.com/pingcap/tidb/issues/47233) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - - 自动统计信息收集根据节点规模和硬件规格自动确定执行和扫描的并发度 [#53460](https://github.com/pingcap/tidb/issues/53460) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** + - 支持通过系统变量 `tidb_auto_analyze_concurrency` 设置单个自动统计信息收集任务内部的并发度 [#53460](https://github.com/pingcap/tidb/issues/53460) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** - 优化一处内部函数逻辑,提升查询列数特别多的表时的性能 [#52112](https://github.com/pingcap/tidb/issues/52112) @[Rustin170506](https://github.com/Rustin170506) - 支持将形如 `a = 1 AND (a > 1 OR (a = 1 AND b = 2))` 的过滤条件简化为 `a = 1 AND b = 2` [#56005](https://github.com/pingcap/tidb/issues/56005) @[ghazalfamilyusa](https://github.com/ghazalfamilyusa) - 在部分选中不优执行计划风险较高的场景中,提高代价模型中 Table Scan 的代价,使得优化器更倾向于使用索引 [#56012](https://github.com/pingcap/tidb/issues/56012) @[terry1purcell](https://github.com/terry1purcell) @@ -453,7 +453,7 @@ TiDB 版本:8.4.0 - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) - 修复一张表索引中包含生成列时,`ANALYZE` 这张表可能报错 “Unknown column 'column_name' in 'expression'” 的问题 [#55438](https://github.com/pingcap/tidb/issues/55438) @[hawkingrei](https://github.com/hawkingrei) - - 将 `analyze-partition-concurrency-quota` 配置文件参数标记为废弃 [#55043](https://github.com/pingcap/tidb/issues/55043) @[Rustin170506](https://github.com/Rustin170506) + - 废弃统计信息相关的无用配置,减少冗余代码 [#55043](https://github.com/pingcap/tidb/issues/55043) @[Rustin170506](https://github.com/Rustin170506) - 修复执行一条包含关联子查询和 CTE 的查询时,TiDB 可能 hang 住或返回错误结果的问题 [#55551](https://github.com/pingcap/tidb/issues/55551) @[guo-shaoge](https://github.com/guo-shaoge) - 修复禁用 `lite-init-stats` 可能导致统计信息同步加载失败的问题 [#54532](https://github.com/pingcap/tidb/issues/54532) @[hawkingrei](https://github.com/hawkingrei) - 修复当 `UPDATE` 或 `DELETE` 语句包含 Recursive CTE 时,语句可能报错或不生效的问题 [#55666](https://github.com/pingcap/tidb/issues/55666) @[time-and-fate](https://github.com/time-and-fate) From 605166bba81fc341c177706f1c53e7f297bd1327 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 30 Sep 2024 16:59:35 +0800 Subject: [PATCH 117/127] Apply suggestions from code review Co-authored-by: Aolin --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index a32e9524a499..4a5648d12c63 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -208,7 +208,7 @@ TiDB 版本:8.4.0 向量搜索是一种基于数据语义的搜索方法,可以提供更相关的搜索结果。作为 AI 和大语言模型 (LLM) 的核心功能之一,向量搜索可用于检索增强生成 (Retrieval-Augmented Generation, RAG)、语义搜索、推荐系统等多种场景。 - 从 v8.4.0 开始,TiDB 支持[向量数据类型](vector-search-data-types.md)和[向量搜索索引](vector-search-index.md),具备强大的向量搜索能力。TiDB 的向量数据类型最多可支持 16383 维度,并支持多种[距离函数](/vector-search-functions-and-operators.md#向量函数),包括 L2 距离(欧式距离)、余弦距离、负内积和 L1 距离(曼哈顿距离)。 + 从 v8.4.0 开始,TiDB 支持[向量数据类型](/vector-search-data-types.md)和[向量搜索索引](/vector-search-index.md),具备强大的向量搜索能力。TiDB 的向量数据类型最多可支持 16383 维度,并支持多种[距离函数](/vector-search-functions-and-operators.md#向量函数),包括 L2 距离(欧式距离)、余弦距离、负内积和 L1 距离(曼哈顿距离)。 在使用时,你只需要创建包含向量数据类型的表,并插入向量数据,即可执行向量搜索查询,也可进行向量数据与传统关系数据的混合查询。 From 5081f48f453d376ebab17e7f1a4c5a1cf8eba2d6 Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Tue, 8 Oct 2024 10:55:27 +0800 Subject: [PATCH 118/127] Remove description for gb18030 Co-authored-by: Aolin --- releases/release-8.4.0.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 4a5648d12c63..5df8ed3c70b7 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -216,16 +216,6 @@ TiDB 版本:8.4.0 更多信息,请参考[用户文档](/vector-search-overview.md)。 -* 支持字符集 `gb18030` 和排序规则 `gb18030_bin` 和 `gb18030_chinese_ci` [#17470](https://github.com/tikv/tikv/issues/17470) [#55791](https://github.com/pingcap/tidb/issues/55791) @[cbcwestwolf](https://github.com/cbcwestwolf) **tw@lilin90** - - 从 v8.4.0 开始,TiDB 支持 `gb18030` 字符集,以确保 TiDB 能够更好地处理中文相关的数据存储和查询需求。该字符集是一个广泛用于中文字符编码的标准。 - - 从 v8.4.0 开始,TiDB 支持 `gb18030_bin` 和 `gb18030_chinese_ci` 排序规则。`gb18030_bin` 提供了基于二进制的精准排序,而 `gb18030_chinese_ci` 则支持大小写不敏感的通用排序规则。这两种排序规则使得对 `gb18030` 编码文本的排序和比较更加灵活高效。 - - 通过支持 `gb18030` 字符集及其排序规则,TiDB v8.4.0 增强了与中文应用场景的兼容性,特别是在涉及多种语言和字符编码的场景下,可以更方便地进行字符集的选择和操作,提升了数据库的使用体验。 - - 更多信息,请参考[用户文档](/character-set-gb18030.md)。 - ### 数据库管理 * 日志备份数据支持客户端加密(实验特性)[#55834](https://github.com/pingcap/tidb/issues/55834) @[Tristan1900](https://github.com/Tristan1900) **tw@qiancai** @@ -397,7 +387,6 @@ TiDB 版本:8.4.0 - 支持 `date_add`/`date_sub` 函数的计算下推 [#17529](https://github.com/tikv/tikv/issues/17529) @[gengliqi](https://github.com/gengliqi) - 支持在线更改流控(flow-control)相关配置 [#17395](https://github.com/tikv/tikv/issues/17395) @[glorv](https://github.com/glorv) - 优化空表和小 region 场景下的 Region Merge 的速度 [#17376](https://github.com/tikv/tikv/issues/17376) @[LykxSassinator](https://github.com/LykxSassinator) - - 支持 gb18030 字符集和 gb18030_bin、gb18030_chinese_ci 排序规则 [#17470](https://github.com/tikv/tikv/issues/17470) @[CbcWestwolf](https://github.com/CbcWestwolf) - Pipelined DML 不会长时间阻塞 resolved-ts。 [#17459](https://github.com/tikv/tikv/issues/17459)@[ekexium](https://github.com/ekexium) + PD From ba921dc50122872d9398c1a456135584a1792144 Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 8 Oct 2024 11:04:47 +0800 Subject: [PATCH 119/127] compatibility changes: tidb_enable_inl_join_inner_multi_pattern, tidb_analyze_partition_concurrency, tidb_auto_analyze_concurrency, tidb_enable_instance_plan_cache, tidb_instance_plan_cache_max_size, tidb_instance_plan_cache_reserved_percentage, pessimistic-txn.in-memory-peer-size-limit, pessimistic-txn.in-memory-instance-size-limit, claim-check-raw-value Signed-off-by: Aolin --- releases/release-8.4.0.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 5df8ed3c70b7..547bd90748fd 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -297,9 +297,12 @@ TiDB 版本:8.4.0 | [`tidb_enable_table_partition`](/system-variables.md#tidb_enable_table_partition) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用[分区表](/partitioned-table.md)。| | [`tidb_opt_prefer_range_scan`](/system-variables.md#tidb_opt_prefer_range_scan-从-v50-版本开始引入) | 修改 | 从 v8.4.0 开始,此变量的默认值从 `OFF` 更改为 `ON`。对于没有统计信息的表(伪统计信息)或空表(零统计信息),优化器将优先选择区间扫描而不是全表扫描。| | [`tidb_scatter_region`](/system-variables.md#tidb_scatter_region) | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 Region 只支持表级别打散。从 v8.4.0 开始,增加 `SESSION` 作用域,类型由布尔型变更为枚举型,默认值由原来的 `OFF` 变更为空,并增加了可选值 `TABLE` 和 `GLOBAL`。支持集群级别的打算策略,避免快速批量建表时由于 Region 分布不均匀导致 TiKV OOM 的问题。| -| [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值改为 `ON`。当内表上有 `Selection` 或 `Projection` 算子时默认支持 Index Join | -| [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)| 新增 | 这个变量控制是否开启 Instance Plan Cache 功能。 | -| [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) | 新增 | 这个变量控制 Instance Plan Cache 的目标内存大小,超过这个大小则触发清理。| +| [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值从 `OFF` 修改为 `ON`。从 v8.4.0 开始,当内表上有 `Selection`、`Projection` 或 `Aggregation` 算子时默认支持 Index Join。 | +| [`tidb_analyze_partition_concurrency`](/system-variables.md#tidb_analyze_partition_concurrency) | 修改 | 取值范围从 `[1, 18446744073709551615]` 修改为 `[1, 128]`。| +| [`tidb_auto_analyze_concurrency`](/system-variables.md#tidb_auto_analyze_concurrency-从-v840-版本开始引入)| 新增 | 设置单个自动统计信息收集任务内部的并发度。在 v8.4.0 之前的版本中,该并发度固定为 `1`。你可以根据集群资源情况提高该并发度,从而加快统计信息收集任务的执行速度。 | +| [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)| 新增 | 控制是否开启 Instance Plan Cache 功能。 | +| [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) | 新增 | 设置 Instance Plan Cache 的最大内存使用量。| +| [`tidb_instance_plan_cache_reserved_percentage`](/system-variables.md#tidb_instance_plan_cache_reserved_percentage-从-v840-版本开始引入) | 新增 | 控制内存驱逐后 Instance Plan Cache 的空闲内存百分比。| | [`tidb_pre_split_regions`](/system-variables.md#tidb_pre_split_regions-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行分裂分片数,需要在每个 `CREATE TABLE` SQL 语句里声明 `PRE_SPLIT_REGIONS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [`tidb_shard_row_id_bits`](/system-variables.md#tidb_shard_row_id_bits-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行 ID 的分片位数,需要在每个 `CREATE TABLE` 或 `ALTER TABLE` 的 SQL 语句里声明 `SHARD_ROW_ID_BITS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | @@ -315,13 +318,14 @@ TiDB 版本:8.4.0 | TiKV | [`region-split-keys`](/tikv-configuration-file.md#region-split-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `"2560000"`。在 v8.4.0 之前,默认值为 `"960000"`。 | | TiKV | [`region-split-size`](/tikv-configuration-file.md#region-split-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `"256MiB"`。在 v8.4.0 之前,默认值为 `"96MiB"`。 | | TiKV | [`sst-max-size`](/tikv-configuration-file.md#sst-max-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `"384MiB"`。在 v8.4.0 之前,默认值为 `"144MiB"`。 | -| TiKV | in_memory_peer_size_limit | 新增 | 该配置文件参数用于指定单 region 的内存悲观锁的内存上限 | -| TiKV | in_memory_global_size_limit | 新增 | 该配置文件参数用于指定 TiKV 实例的内存悲观锁的内存上限 | +| TiKV | [`pessimistic-txn.in-memory-peer-size-limit`](/tikv-configuration-file.md#in-memory-peer-size-limit-从-v840-版本开始引入) | 新增 | 控制单个 Region 内存悲观锁的内存使用上限。超过此限制时,悲观锁将回退到持久化方式写入磁盘。| +| TiKV | [`pessimistic-txn.in-memory-instance-size-limit`](/tikv-configuration-file.md#in-memory-instance-size-limit-从-v840-版本开始引入) | 新增 | 控制单个 TiKV 实例内存悲观锁的内存使用上限。超过此限制时,悲观锁将回退到持久化方式写入磁盘。| | TiKV | [`raft-engine.spill-dir`](/tikv-configuration-file.md#spill-dir-从-v840-版本开始引入) | 新增 | 该配置文件参数用于指定 TiKV 实例存储 Raft 日志文件的辅助目录,用于支持多盘存储 Raft 日志文件 | | TiKV | [`resource-control.priority-ctl-strategy`](/tikv-configuration-file.md#priority-ctl-strategy-从-v840-版本开始引入) | 新增 | 该配置文件参数用于配置低优先级任务的管控策略。TiKV 通过对低优先级的任务添加流量控制来确保优先执行更高优先级的任务。 | | PD | [`max-merge-region-keys`](/pd-configuration-file.md#max-merge-region-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `540000`。在 v8.4.0 之前,默认值为 `200000`。 | | PD | [`max-merge-region-size`](/pd-configuration-file.md#max-merge-region-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `54`。在 v8.4.0 之前,默认值为 `20`。 | | TiFlash | [`storage.format_version`](/tiflash/tiflash-configuration.md) | 修改 | 默认值从 `5` 修改为 `7`,该格式可以支持向量索引的构建与存储。 | +| TiCDC | [`claim-check-raw-value`](/ticdc/ticdc-sink-to-kafka.md#只发送-value-部分到外部存储) | 新增 | 控制 TiCDC 是否仅将 Kafka 消息的 `value` 部分发送到外部存储,该功能仅适用于非 Open Protocol 协议。 | ### 系统表 From 8f0ad5d5f2795fbc3d909b06ae291a604d7ba247 Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 8 Oct 2024 11:13:47 +0800 Subject: [PATCH 120/127] remove Maintain The Priority Queue In Memory V2 Signed-off-by: Aolin --- releases/release-8.4.0.md | 1 - 1 file changed, 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 547bd90748fd..071a38a9bb36 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -364,7 +364,6 @@ TiDB 版本:8.4.0 - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低大量并发写入引发的开销 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection`、`Projection` 或 `Aggregation` 算子时默认支持 Index Join [#47233](https://github.com/pingcap/tidb/issues/47233) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - - 优化自动收集统计信息任务优先级队列的运行效率 [#49972](https://github.com/pingcap/tidb/issues/49972) @[Rustin170506](https://github.com/Rustin170506) **tw@Oreoxmt** - 支持通过系统变量 `tidb_auto_analyze_concurrency` 设置单个自动统计信息收集任务内部的并发度 [#53460](https://github.com/pingcap/tidb/issues/53460) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** - 优化一处内部函数逻辑,提升查询列数特别多的表时的性能 [#52112](https://github.com/pingcap/tidb/issues/52112) @[Rustin170506](https://github.com/Rustin170506) - 支持将形如 `a = 1 AND (a > 1 OR (a = 1 AND b = 2))` 的过滤条件简化为 `a = 1 AND b = 2` [#56005](https://github.com/pingcap/tidb/issues/56005) @[ghazalfamilyusa](https://github.com/ghazalfamilyusa) From 476473a8e591d48fb128c4aa2777000c471d4ec9 Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 8 Oct 2024 11:28:01 +0800 Subject: [PATCH 121/127] Refine format --- releases/release-8.4.0.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 071a38a9bb36..283d52455135 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -221,7 +221,7 @@ TiDB 版本:8.4.0 * 日志备份数据支持客户端加密(实验特性)[#55834](https://github.com/pingcap/tidb/issues/55834) @[Tristan1900](https://github.com/Tristan1900) **tw@qiancai** 在之前的版本中,仅快照备份数据支持客户端加密。从 v8.4.0 起,日志备份数据也支持客户端加密。在上传日志备份到备份存储之前,你可以选择以下方式之一对日志备份数据进行加密,从而确保备份数据的安全性: - + - 使用自定义的固定密钥加密 - 使用本地磁盘的主密钥加密 - 使用 KMS(密钥管理服务)的主密钥加密 @@ -245,7 +245,7 @@ TiDB 版本:8.4.0 - [慢日志](/analyze-slow-queries.md)中增加字段 `Tidb_cpu_time` 和 `Tikv_cpu_time`,显示被捕捉到的 SQL 语句的 CPU 的时间。 其中,TiKV 的 CPU 时间默认显示。采集 TiDB 的 CPU 时间会引入额外开销(约 8%),因此仅在开启 [Top SQL 特性](/dashboard/top-sql.md)时,TiDB 的 CPU 时间才会显示为实际值,否则始终显示为 `0`。 - + 更多信息,请参考[用户文档](/information-schema/information-schema-processlist.md)和[用户文档](information-schema/information-schema-slow-query.md)。 * Top SQL 支持按表或数据库维度查看 CPU 时间的聚合结果 [#55540](https://github.com/pingcap/tidb/issues/55540) @[nolouch](https://github.com/nolouch) **tw@lilin90** @@ -275,7 +275,7 @@ TiDB 版本:8.4.0 * TiCDC 引入 Checksum V2 算法校验 Update 或 Delete 事件中 Old Value 数据 [#10969](https://github.com/pingcap/tiflow/issues/10969) @[3AceShowHand](https://github.com/3AceShowHand) **tw@Oreoxmt** 从 v8.4.0 开始,TiDB 和 TiCDC 引入 Checksum V2 算法,解决了 Checksum V1 在执行 `ADD COLUMN` 或 `DROP COLUMN` 后无法正确校验 Update 或 Delete 事件中 Old Value 数据的问题。对于 v8.4.0 及之后新创建的集群,或从之前版本升级到 v8.4.0 的集群,启用单行数据 Checksum 正确性校验功能后,TiDB 默认使用 Checksum V2 算法进行 Checksum 计算和校验。TiCDC 支持同时处理 V1 和 V2 两种 Checksum。该变更仅影响 TiDB 和 TiCDC 内部实现,不影响下游 Kafka consumer 的 Checksum 计算校验方法。 - + 更多信息,请参考[用户文档](/ticdc/ticdc-integrity-check.md)。 ## 兼容性变更 @@ -313,11 +313,11 @@ TiDB 版本:8.4.0 | 配置文件 | 配置项 | 修改类型 | 描述 | | -------- | -------- | -------- | -------- | -| TiDB | [`grpc-keepalive-time`](/tidb-configuration-file.md#grpc-keepalive-time) | 修改 | 增加最小值 `1`。 | -| TiDB | [`grpc-keepalive-timeout`](/tidb-configuration-file.md#grpc-keepalive-timeout) | 修改 | 该配置文件参数原先为 INT 类型,且最小值仅支持设置为 `1`。从 v8.4.0 开始,数据类型修改为 FLOAT64,且最小值支持设置为 `0.05`,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | -| TiKV | [`region-split-keys`](/tikv-configuration-file.md#region-split-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `"2560000"`。在 v8.4.0 之前,默认值为 `"960000"`。 | -| TiKV | [`region-split-size`](/tikv-configuration-file.md#region-split-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `"256MiB"`。在 v8.4.0 之前,默认值为 `"96MiB"`。 | -| TiKV | [`sst-max-size`](/tikv-configuration-file.md#sst-max-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `"384MiB"`。在 v8.4.0 之前,默认值为 `"144MiB"`。 | +| TiDB | [`grpc-keepalive-time`](/tidb-configuration-file.md#grpc-keepalive-time) | 修改 | 增加最小值 `1`。 | +| TiDB | [`grpc-keepalive-timeout`](/tidb-configuration-file.md#grpc-keepalive-timeout) | 修改 | 该配置文件参数原先为 INT 类型,且最小值仅支持设置为 `1`。从 v8.4.0 开始,数据类型修改为 FLOAT64,且最小值支持设置为 `0.05`,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | +| TiKV | [`region-split-keys`](/tikv-configuration-file.md#region-split-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `"2560000"`。在 v8.4.0 之前,默认值为 `"960000"`。 | +| TiKV | [`region-split-size`](/tikv-configuration-file.md#region-split-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `"256MiB"`。在 v8.4.0 之前,默认值为 `"96MiB"`。 | +| TiKV | [`sst-max-size`](/tikv-configuration-file.md#sst-max-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `"384MiB"`。在 v8.4.0 之前,默认值为 `"144MiB"`。 | | TiKV | [`pessimistic-txn.in-memory-peer-size-limit`](/tikv-configuration-file.md#in-memory-peer-size-limit-从-v840-版本开始引入) | 新增 | 控制单个 Region 内存悲观锁的内存使用上限。超过此限制时,悲观锁将回退到持久化方式写入磁盘。| | TiKV | [`pessimistic-txn.in-memory-instance-size-limit`](/tikv-configuration-file.md#in-memory-instance-size-limit-从-v840-版本开始引入) | 新增 | 控制单个 TiKV 实例内存悲观锁的内存使用上限。超过此限制时,悲观锁将回退到持久化方式写入磁盘。| | TiKV | [`raft-engine.spill-dir`](/tikv-configuration-file.md#spill-dir-从-v840-版本开始引入) | 新增 | 该配置文件参数用于指定 TiKV 实例存储 Raft 日志文件的辅助目录,用于支持多盘存储 Raft 日志文件 | @@ -361,7 +361,7 @@ TiDB 版本:8.4.0 - 优化 MEMDB 实现,降低事务中的写操作延时与 TiDB CPU 使用 [#55287](https://github.com/pingcap/tidb/issues/55287) @[you06](https://github.com/you06) **tw@hfxsd** - 优化系统变量 `tidb_dml_type` 为 `"bulk"` 时 DML 语句的执行性能 [#50215](https://github.com/pingcap/tidb/issues/50215) @[ekexium](https://github.com/ekexium) **tw@qiancai** - 支持使用 [Optimizer Fix Control 47400](/optimizer-fix-controls.md#47400-从-v840-版本开始引入) 控制优化器是否将 `estRows` 的最小值限制为 `1`,与 Oracle 和 DB2 等数据库的行为保持一致 [#47400](https://github.com/pingcap/tidb/issues/47400) @[terry1purcell](https://github.com/terry1purcell) **tw@Oreoxmt** - - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低大量并发写入引发的开销 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** + - 为日志表 [`mysql.tidb_runaway_queries`](/mysql-schema/mysql-schema.md#runaway-queries-相关系统表) 增加写入控制,降低大量并发写入引发的开销 [#54434](https://github.com/pingcap/tidb/issues/54434) @[HuSharp](https://github.com/HuSharp) **tw@lilin90** - 当内表上有 `Selection`、`Projection` 或 `Aggregation` 算子时默认支持 Index Join [#47233](https://github.com/pingcap/tidb/issues/47233) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 在某些场景下减少 `DELETE` 操作从 TiKV 获取的列信息数量,降低 `DELETE` 操作的资源开销 [#38911](https://github.com/pingcap/tidb/issues/38911) @[winoros](https://github.com/winoros) **tw@Oreoxmt** - 支持通过系统变量 `tidb_auto_analyze_concurrency` 设置单个自动统计信息收集任务内部的并发度 [#53460](https://github.com/pingcap/tidb/issues/53460) @[hawkingrei](https://github.com/hawkingrei) **tw@Oreoxmt** @@ -395,7 +395,7 @@ TiDB 版本:8.4.0 + PD - note [#issue](https://github.com/pingcap/tidb/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) - - 支持 TiKV 节点在 TiDB Lightning 导入数据期间优雅下线 (graceful offline) [#7853](https://github.com/tikv/pd/issues/7853) @[okJiang](https://github.com/okJiang) **tw@qiancai** + - 支持 TiKV 节点在 TiDB Lightning 导入数据期间优雅下线 (graceful offline) [#7853](https://github.com/tikv/pd/issues/7853) @[okJiang](https://github.com/okJiang) **tw@qiancai** + TiFlash @@ -464,7 +464,7 @@ TiDB 版本:8.4.0 - 修复当用户请求历史 DDL 任务信息时,DDL 历史任务过多导致 OOM 的问题 [#55711](https://github.com/pingcap/tidb/issues/55711)) @[joccau](https://github.com/joccau) - 修复当 Region 大小超过 96M 时,全局有序 IMPORT INTO 卡住的问题 [#55374](https://github.com/pingcap/tidb/issues/55374) @[lance6716](https://github.com/lance6716) - 修复在临时表上使用 `import into` 会导致 tidb crash 的问题 [#55970](https://github.com/pingcap/tidb/issues/55970) @[D3Hunter](https://github.com/D3Hunter) - - 修复添加唯一索引意外地报告 duplicate entry 错误的问题 [#56161](https://github.com/pingcap/tidb/issues/56161) @[tangenta](https://github.com/tangenta) + - 修复添加唯一索引意外地报告 duplicate entry 错误的问题 [#56161](https://github.com/pingcap/tidb/issues/56161) @[tangenta](https://github.com/tangenta) - 修复当 TiKV 停机超过 810 秒后时,Lightning 未摄取所有 KV 对导致表中数据不一致的问题 [#55808](https://github.com/pingcap/tidb/issues/55808) @[lance6716](https://github.com/lance6716) + TiKV From 25928e632b7ec39ebd10f864aa22102bac2852f0 Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 8 Oct 2024 11:39:29 +0800 Subject: [PATCH 122/127] bug fix: add TiDB sql-infra Co-authored-by: YangKeao --- releases/release-8.4.0.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 283d52455135..288ae0b3a658 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -466,6 +466,9 @@ TiDB 版本:8.4.0 - 修复在临时表上使用 `import into` 会导致 tidb crash 的问题 [#55970](https://github.com/pingcap/tidb/issues/55970) @[D3Hunter](https://github.com/D3Hunter) - 修复添加唯一索引意外地报告 duplicate entry 错误的问题 [#56161](https://github.com/pingcap/tidb/issues/56161) @[tangenta](https://github.com/tangenta) - 修复当 TiKV 停机超过 810 秒后时,Lightning 未摄取所有 KV 对导致表中数据不一致的问题 [#55808](https://github.com/pingcap/tidb/issues/55808) @[lance6716](https://github.com/lance6716) + - 修复了无法对 Cache Table 使用 `CREATE TABLE LIKE` 语句的问题 [#56134](https://github.com/pingcap/tidb/issues/56134) @[tiancaiamao](https://github.com/tiancaiamao) + - 修复了 CTE 中 `FORMAT()` 表达式的警告信息混乱的问题 [#56198](https://github.com/pingcap/tidb/pull/56198) @[dveeden](https://github.com/dveeden) + - 修复了 `CREATE TABLE` 与 `ALTER TABLE` 建立分区表时对列的类型限制不一致的问题 [#56094](https://github.com/pingcap/tidb/issues/56094) @[mjonss](https://github.com/mjonss) + TiKV From 9e0aa8e9ce7423d18ad689db1d52b9bdfe48bb2b Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 8 Oct 2024 11:40:15 +0800 Subject: [PATCH 123/127] bug fix: add PD Co-authored-by: JmPotato --- releases/release-8.4.0.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 288ae0b3a658..f3190b51ecfc 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -469,6 +469,8 @@ TiDB 版本:8.4.0 - 修复了无法对 Cache Table 使用 `CREATE TABLE LIKE` 语句的问题 [#56134](https://github.com/pingcap/tidb/issues/56134) @[tiancaiamao](https://github.com/tiancaiamao) - 修复了 CTE 中 `FORMAT()` 表达式的警告信息混乱的问题 [#56198](https://github.com/pingcap/tidb/pull/56198) @[dveeden](https://github.com/dveeden) - 修复了 `CREATE TABLE` 与 `ALTER TABLE` 建立分区表时对列的类型限制不一致的问题 [#56094](https://github.com/pingcap/tidb/issues/56094) @[mjonss](https://github.com/mjonss) + - 修复 `INFORMATION_SCHEMA.RUNAWAY_WATCHES` 表中时间类型不正确的问题 [#54770](https://github.com/pingcap/tidb/issues/54770) @[HuSharp](https://github.com/HuSharp) + - 支持集群级别的 Scatter Region 打散 [#8424](https://github.com/tikv/pd/issues/8424) @[River2000i](https://github.com/River2000i) + TiKV @@ -479,8 +481,9 @@ TiDB 版本:8.4.0 + PD - - note [#issue](https://github.com/tikv/pd/issues/${issue-id}) @[贡献者 GitHub ID](https://github.com/${github-id}) - - (dup): release-8.1.1.md > 错误修复> PD - 修复 `INFORMATION_SCHEMA.RUNAWAY_WATCHES` 表中时间类型不正确的问题 [#54770](https://github.com/pingcap/tidb/issues/54770) @[HuSharp](https://github.com/HuSharp) + - 在 pd-ctl 命令中将 `scatter-range` 重命名为 `scatter-range-scheduler` [#8379](https://github.com/tikv/pd/issues/8379) @[okJiang](https://github.com/okJiang) + - 为 `grant-hot-leader-scheduler` 添加冲突检测 [#4903](https://github.com/tikv/pd/issues/4903) @[lhy1024](https://github.com/lhy1024) + - TSO Client 支持并行发送和接受多个 TSO gRPC 请求 [#8432](https://github.com/tikv/pd/issues/8432) @[MyonKeminta](https://github.com/MyonKeminta) + TiFlash From e1860b862ad5b3189cfb2987e9265e01ead0e165 Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 8 Oct 2024 11:56:27 +0800 Subject: [PATCH 124/127] Add more removed system variables and parameters --- releases/release-8.4.0.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 283d52455135..ab306cf68286 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -98,7 +98,7 @@ TiDB 版本:8.4.0 TiDB 在向 PD 请求 TSO 时,会将一段时间内的请求汇总起来并以同步的方式进行批处理,以减少 RPC (Remote Procedure Call) 请求数量从而降低 PD 负载。对于延迟敏感的场景,这种同步模式的性能并不理想。 - 在 v8.4.0 中,TiDB 新增 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。你可以通过 [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) 变量设定获取 TSO 的 RPC 模式。 + 在 v8.4.0 中,TiDB 新增 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。你可以通过 [`tidb_tso_client_rpc_mode`](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) 变量设定获取 TSO 的 RPC 模式。 更多信息,请参考[用户文档](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入)。 @@ -292,9 +292,12 @@ TiDB 版本:8.4.0 | 变量名 | 修改类型(包括新增/修改/删除) | 描述 | |--------|------------------------------|------| +| [`log_bin`](/system-variables.md#log_bin) | 删除 | 从 v8.4.0 开始,[TiDB Binlog](https://docs.pingcap.com/zh/tidb/v8.3/tidb-binlog-overview) 被移除。该变量表示是否使用 TiDB Binlog,从 v8.4.0 开始被删除。 | +| [`sql_log_bin`](/system-variables.md#sql_log_bin) | 删除 | 从 v8.4.0 开始,[TiDB Binlog](https://docs.pingcap.com/zh/tidb/v8.3/tidb-binlog-overview) 被移除。该变量表示是否将更改写入 TiDB Binlog,从 v8.4.0 开始被删除。 | | [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-从-v760-版本开始引入) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用[全局索引](/partitioned-table.md#全局索引)。你只需在执行 `CREATE TABLE` 或 `ALTER TABLE` 时在对应的列加上关键字 `GLOBAL` 即可创建全局索引。 | | [`tidb_enable_list_partition`](/system-variables.md#tidb_enable_list_partition-从-v50-版本开始引入) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用 [List 分区](/partitioned-table.md#list-分区)。 | | [`tidb_enable_table_partition`](/system-variables.md#tidb_enable_table_partition) | 废弃 | 从 v8.4.0 开始,该变量被废弃。其值将固定为默认值 `ON`,即默认启用[分区表](/partitioned-table.md)。| +| [`tidb_schema_cache_size`](/system-variables.md#tidb_schema_cache_size-从-v800-版本开始引入) | 修改 | 默认值从 `0` 修改为 `536870912` 即 512 MiB,表示默认开启该功能,且最小值允许设置为 `67108864` 即 64 MiB。 | | [`tidb_opt_prefer_range_scan`](/system-variables.md#tidb_opt_prefer_range_scan-从-v50-版本开始引入) | 修改 | 从 v8.4.0 开始,此变量的默认值从 `OFF` 更改为 `ON`。对于没有统计信息的表(伪统计信息)或空表(零统计信息),优化器将优先选择区间扫描而不是全表扫描。| | [`tidb_scatter_region`](/system-variables.md#tidb_scatter_region) | 修改 | 原先为布尔型,仅支持开启或关闭,且开启后新建的表的 Region 只支持表级别打散。从 v8.4.0 开始,增加 `SESSION` 作用域,类型由布尔型变更为枚举型,默认值由原来的 `OFF` 变更为空,并增加了可选值 `TABLE` 和 `GLOBAL`。支持集群级别的打算策略,避免快速批量建表时由于 Region 分布不均匀导致 TiKV OOM 的问题。| | [`tidb_enable_inl_join_inner_multi_pattern`](/system-variables.md#tidb_enable_inl_join_inner_multi_pattern-从-v700-版本开始引入) | 修改 | 默认值从 `OFF` 修改为 `ON`。从 v8.4.0 开始,当内表上有 `Selection`、`Projection` 或 `Aggregation` 算子时默认支持 Index Join。 | @@ -305,14 +308,14 @@ TiDB 版本:8.4.0 | [`tidb_instance_plan_cache_reserved_percentage`](/system-variables.md#tidb_instance_plan_cache_reserved_percentage-从-v840-版本开始引入) | 新增 | 控制内存驱逐后 Instance Plan Cache 的空闲内存百分比。| | [`tidb_pre_split_regions`](/system-variables.md#tidb_pre_split_regions-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行分裂分片数,需要在每个 `CREATE TABLE` SQL 语句里声明 `PRE_SPLIT_REGIONS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [`tidb_shard_row_id_bits`](/system-variables.md#tidb_shard_row_id_bits-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行 ID 的分片位数,需要在每个 `CREATE TABLE` 或 `ALTER TABLE` 的 SQL 语句里声明 `SHARD_ROW_ID_BITS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | -| [tidb_tso_client_rpc_mode](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | -| [tidb_hash_join_version](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 控制 TiDB 是否使用 Hash Join 算子的优化版。默认值为 `legacy`,代表不使用优化版。若设置为 `optimized`,TiDB 在执行 Hash Join 算子时将使用其优化版,以提升 Hash Join 性能。 | -|tidb_schema_cache_size|修改|默认值从 0 修改为 536870912 即 512 MiB,表示默认开启该功能,且最小值允许设置为 67108864 即 64 MiB | +| [`tidb_tso_client_rpc_mode`](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | +| [`tidb_hash_join_version`](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 控制 TiDB 是否使用 Hash Join 算子的优化版。默认值为 `legacy`,代表不使用优化版。若设置为 `optimized`,TiDB 在执行 Hash Join 算子时将使用其优化版,以提升 Hash Join 性能。 | -### 配置文件参数 +### 配置参数 | 配置文件 | 配置项 | 修改类型 | 描述 | | -------- | -------- | -------- | -------- | +| TiDB Binlog | [`--enable-binlog`](/command-line-flags-for-tidb-configuration.md#--enable-binlog) | 删除 | 从 v8.4.0 开始,[TiDB Binlog](https://docs.pingcap.com/zh/tidb/v8.3/tidb-binlog-overview) 被移除。该参数用于开启或关闭 TiDB 中 binlog 的生成,从 v8.4.0 开始被删除。 | | TiDB | [`grpc-keepalive-time`](/tidb-configuration-file.md#grpc-keepalive-time) | 修改 | 增加最小值 `1`。 | | TiDB | [`grpc-keepalive-timeout`](/tidb-configuration-file.md#grpc-keepalive-timeout) | 修改 | 该配置文件参数原先为 INT 类型,且最小值仅支持设置为 `1`。从 v8.4.0 开始,数据类型修改为 FLOAT64,且最小值支持设置为 `0.05`,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | | TiKV | [`region-split-keys`](/tikv-configuration-file.md#region-split-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `"2560000"`。在 v8.4.0 之前,默认值为 `"960000"`。 | From 9984e9f600d28ce74f71112e87f037a4f10c2b0a Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 8 Oct 2024 14:21:07 +0800 Subject: [PATCH 125/127] Update wording --- releases/release-8.4.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 098bf79684c8..0e3a1937afa9 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -313,7 +313,7 @@ TiDB 版本:8.4.0 ### 配置参数 -| 配置文件 | 配置项 | 修改类型 | 描述 | +| 配置文件或组件 | 配置项 | 修改类型 | 描述 | | -------- | -------- | -------- | -------- | | TiDB Binlog | [`--enable-binlog`](/command-line-flags-for-tidb-configuration.md#--enable-binlog) | 删除 | 从 v8.4.0 开始,[TiDB Binlog](https://docs.pingcap.com/zh/tidb/v8.3/tidb-binlog-overview) 被移除。该参数用于开启或关闭 TiDB 中 binlog 的生成,从 v8.4.0 开始被删除。 | | TiDB | [`grpc-keepalive-time`](/tidb-configuration-file.md#grpc-keepalive-time) | 修改 | 增加最小值 `1`。 | From f30b7e53ce6464622e92400b06c37997ffa606b7 Mon Sep 17 00:00:00 2001 From: lilin90 Date: Tue, 8 Oct 2024 14:38:52 +0800 Subject: [PATCH 126/127] Add parameter "logical-import-prep-stmt" --- releases/release-8.4.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index 0e3a1937afa9..f11f88aa3731 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -315,7 +315,6 @@ TiDB 版本:8.4.0 | 配置文件或组件 | 配置项 | 修改类型 | 描述 | | -------- | -------- | -------- | -------- | -| TiDB Binlog | [`--enable-binlog`](/command-line-flags-for-tidb-configuration.md#--enable-binlog) | 删除 | 从 v8.4.0 开始,[TiDB Binlog](https://docs.pingcap.com/zh/tidb/v8.3/tidb-binlog-overview) 被移除。该参数用于开启或关闭 TiDB 中 binlog 的生成,从 v8.4.0 开始被删除。 | | TiDB | [`grpc-keepalive-time`](/tidb-configuration-file.md#grpc-keepalive-time) | 修改 | 增加最小值 `1`。 | | TiDB | [`grpc-keepalive-timeout`](/tidb-configuration-file.md#grpc-keepalive-timeout) | 修改 | 该配置文件参数原先为 INT 类型,且最小值仅支持设置为 `1`。从 v8.4.0 开始,数据类型修改为 FLOAT64,且最小值支持设置为 `0.05`,可以在网络抖动比较频繁的场景,适当调小该值,通过减少重试间隔,来减少网络抖动带来的性能影响。 | | TiKV | [`region-split-keys`](/tikv-configuration-file.md#region-split-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `"2560000"`。在 v8.4.0 之前,默认值为 `"960000"`。 | @@ -328,7 +327,9 @@ TiDB 版本:8.4.0 | PD | [`max-merge-region-keys`](/pd-configuration-file.md#max-merge-region-keys) | 修改 | 从 v8.4.0 开始,默认值修改为 `540000`。在 v8.4.0 之前,默认值为 `200000`。 | | PD | [`max-merge-region-size`](/pd-configuration-file.md#max-merge-region-size) | 修改 | 从 v8.4.0 开始,默认值修改为 `54`。在 v8.4.0 之前,默认值为 `20`。 | | TiFlash | [`storage.format_version`](/tiflash/tiflash-configuration.md) | 修改 | 默认值从 `5` 修改为 `7`,该格式可以支持向量索引的构建与存储。 | +| TiDB Lightning | [`logical-import-prep-stmt`](/tidb-lightning/tidb-lightning-configuration.md) | 新增 | 在逻辑导入模式下,该参数控制是否使用预处理语句和语句缓存来提高性能。默认值为 `false`。 | | TiCDC | [`claim-check-raw-value`](/ticdc/ticdc-sink-to-kafka.md#只发送-value-部分到外部存储) | 新增 | 控制 TiCDC 是否仅将 Kafka 消息的 `value` 部分发送到外部存储,该功能仅适用于非 Open Protocol 协议。 | +| TiDB Binlog | [`--enable-binlog`](/command-line-flags-for-tidb-configuration.md#--enable-binlog) | 删除 | 从 v8.4.0 开始,[TiDB Binlog](https://docs.pingcap.com/zh/tidb/v8.3/tidb-binlog-overview) 被移除。该参数用于开启或关闭 TiDB 中 binlog 的生成,从 v8.4.0 开始被删除。 | ### 系统表 From d69802d93077afa5c4d867f7670e9a8796d8463e Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Tue, 8 Oct 2024 17:20:21 +0800 Subject: [PATCH 127/127] Update wording --- releases/release-8.4.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/release-8.4.0.md b/releases/release-8.4.0.md index f11f88aa3731..aee54b405f11 100644 --- a/releases/release-8.4.0.md +++ b/releases/release-8.4.0.md @@ -306,8 +306,8 @@ TiDB 版本:8.4.0 | [`tidb_enable_instance_plan_cache`](/system-variables.md#tidb_enable_instance_plan_cache-从-v840-版本开始引入)| 新增 | 控制是否开启 Instance Plan Cache 功能。 | | [`tidb_instance_plan_cache_max_size`](/system-variables.md#tidb_instance_plan_cache_max_size-从-v840-版本开始引入) | 新增 | 设置 Instance Plan Cache 的最大内存使用量。| | [`tidb_instance_plan_cache_reserved_percentage`](/system-variables.md#tidb_instance_plan_cache_reserved_percentage-从-v840-版本开始引入) | 新增 | 控制内存驱逐后 Instance Plan Cache 的空闲内存百分比。| -| [`tidb_pre_split_regions`](/system-variables.md#tidb_pre_split_regions-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行分裂分片数,需要在每个 `CREATE TABLE` SQL 语句里声明 `PRE_SPLIT_REGIONS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | -| [`tidb_shard_row_id_bits`](/system-variables.md#tidb_shard_row_id_bits-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表的默认行 ID 的分片位数,需要在每个 `CREATE TABLE` 或 `ALTER TABLE` 的 SQL 语句里声明 `SHARD_ROW_ID_BITS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | +| [`tidb_pre_split_regions`](/system-variables.md#tidb_pre_split_regions-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表默认的行分裂分片数,需要在每个 `CREATE TABLE` SQL 语句里声明 `PRE_SPLIT_REGIONS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | +| [`tidb_shard_row_id_bits`](/system-variables.md#tidb_shard_row_id_bits-从-v840-版本开始引入) | 新增 | 在 v8.4.0 之前,要设置新建表默认的行 ID 的分片数,需要在每个 `CREATE TABLE` 或 `ALTER TABLE` 的 SQL 语句里声明 `SHARD_ROW_ID_BITS`,一旦需要同样配置的表数量较多,操作复杂。为解决这些问题,引入了该变量。你可以在 `GLOBAL` 或 `SESSION` 级别设置该系统变量,提升易用性。 | | [`tidb_tso_client_rpc_mode`](/system-variables.md#tidb_tso_client_rpc_mode-从-v840-版本开始引入) | 新增 | 原有的 TSO 请求为同步模式。现在引入 TSO 请求的异步批处理模式,并提供不同的并发能力。异步模式可以降低获取 TSO 的延迟,但可能会增加 PD 的负载。 | | [`tidb_hash_join_version`](/system-variables.md#tidb_hash_join_version-从-v840-版本开始引入) | 新增 | 控制 TiDB 是否使用 Hash Join 算子的优化版。默认值为 `legacy`,代表不使用优化版。若设置为 `optimized`,TiDB 在执行 Hash Join 算子时将使用其优化版,以提升 Hash Join 性能。 |