Releases: oceanbase/oceanbase
v4.2.0_CE_BP1
Version information
Information | Description |
---|---|
Release date | September 14, 2023 |
Version | V4.2.0_CE_BP1 |
Commit number | 600ea45 |
OBServer RPM version | oceanbase-ce-4.2.0.0-101000032023091319 |
Overview
This version addressed several customer and internal testing issues to enhance product stability.
Bug fixes
Considerations
-
In versions between V4.1.0_CE_BP3 and V4.2.0_CE, if the default value of the hidden parameter
_optimizer_better_inlist_costing
was changed fromFalse
toTrue
, it needs to be changed back toFalse
. Otherwise, the OBserver node might encounter exceptions after a restart. -
If you want to upgrade the Community Edition from V4.1.0 to V4.2.0, it is recommended that you directly upgrade to V4.2.0_CE_BP1 or higher to avoid potential transaction timeout issues that may be triggered during the upgrade process.
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-09-14 |
版本号 | V4.2.0_CE_BP1 |
Commit 号 | 600ea45 |
OBServer RPM 版本号 | oceanbase-ce-4.2.0.0-101000032023091319 |
发版目的
解决用户及内部测试遇到的问题,提升版本稳定性。
BUG 修复
- 修复在查询计划中包含 INDEX SKIP SCAN,并且在开启并行查询的场景下可能导致查询结果不正确的问题。
- 修复在使用 REPLACE INTO 的场景下,可能出现的主表和索引表数据不一致问题。
- 修复显式设置
_optimizer_better_inlist_costing=true
场景下,可能导致 OBServer 重启后运行异常问题。 - 修复从 V4.1.0_CE 版本升级到 V4.2.0_CE 版本的场景中,
__all_tenant_info
表中max_ls_id
字段未正确更新,可能导致升级后事务持续重试直到报超时的问题。
注意事项
- V4.1.0_CE_BP3 版本到 V4.2.0_CE 之间的版本,如果将隐藏配置项 _optimizer_better_inlist_costing 的默认值 False 改为 True,那么需要将其改回 False。否则,可能会导致重启后运行异常的问题。
- 如果您想从 V4.1.0 版本升级到 V4.2.0 版本,建议您直接升级到 V4.2.0_CE_BP1 或更高版本,以避免因升级可能触发的事务超时问题。
v3.1.5_CE_HF2
Version information
Information | Description |
---|---|
Release date | September 12, 2023 |
Version | V3.1.5_CE_HF2 |
Commit number | 8a9dc4b |
OBServer RPM version | oceanbase-ce-3.1.5-100020022023091114 |
Overview
This version fixed some bugs and improved stability.
Bug fixes
- Added the
role_change_timeout
parameter to fix the issue where the partition role was changed due to frequent timeouts in large transaction scenarios. - Fixed the issue where, in special scenarios, the Time to Live (TTL) timer failed to start after the cluster was restarted from a crash, resulting in a leaderless partition and the inability to recover the cluster.
- Fixed the following issue: The RootService leader switchover was triggered in high traffic scenarios. However, the partition with the TTL timer failed to be elected as the new leader, causing the new leader of the RootService could not start.
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-09-12 |
版本号 | V3.1.5_CE_HF2 |
Commit 号 | 8a9dc4b |
OBServer RPM 版本号 | oceanbase-ce-3.1.5-100020022023091114 |
发版目的
本次发版主要是 BUG 修复,提升版本稳定性。
BUG 修复
v4.2.0_CE
Version information
Information | Description |
---|---|
Release date | September 4, 2023 |
Version | V4.2.0_CE |
Commit number | 7e912e0 |
OBServer RPM version | oceanbase-ce-4.2.0.0-100010032023083021 |
Overview
- This version addressed several customer and internal testing issues to enhance product stability.
- This version now supports data reads between OceanBase MySQL tenants by using a DBLink.
- Disable the temporary table feature in MySQL mode.
Bug fixes and improvements
- Fixed the issue where the garbage collection (GC) thread would skip partition checks and cause excessive storage consumption when there were no multi-version SSTables available.
- Fixed the issue where major compaction would get stuck due to Error 4012 when the system attempted to read tablets from the disk.
- Fixed the bypass import timeout issue caused by excessive load on the Clog disk.
- Fixed the issue where high-priority RPC requests were unable to enter the queue and could trigger Error 4019 when normal-priority RPC requests reached the limit.
- Fixed the issue where creating unique indexes in parallel on a table that contains duplicate rows of data could cause core dump.
- Fixed the issue where reading from the leader node forcefully would cause its CPU resources to be occupied by traffic from the follower nodes during the retry of weak consistency reads.
- Fixed the issue where the cluster would encounter Error 4184 due to temporary file I/O exceptions in high disk load scenarios.
- Fixed the issue where the SqlExecutor module encountered memory bloat due to improper memory allocation during MERGE JOIN operations.
- Fixed the issue where the cluster could encounter exceptions in some clock drift scenarios.
- Optimized the online statistics collection strategy by only collecting global statistics for partitioned tables and not collecting partition-level statistics, so as to help alleviate the problems of excessive RPC requests and high memory usage.
- Improved the efficiency of reloading configurations during the restart process in scenarios with a large number of partitions.
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-09-04 |
版本号 | V4.2.0_CE |
Commit 号 | 7e912e0 |
OBServer RPM 版本号 | oceanbase-ce-4.2.0.0-100010032023083021 |
发版目的
- 解决客户及内部测试遇到的问题,提升版本稳定性。
- 社区版支持 MySQL 租户间的 DBLINK 读功能。
- MySQL 模式下禁用临时表功能。
缺陷修复
- 修复在没有多版本 SSTable 的情况下,GC(Garbage Collection) 线程跳过相关分区检查,导致用户存储空间放大的问题。
- 修复从磁盘读 Tablet 返回 4012 超时,可能导致的合并卡住问题。
- 修复 Clog 盘负载过高可能导致的旁路导入执行超时问题。
- 当普通优先级的 RPC 队列积压到队列上限后,导致高优先级的 RPC 无法进入队列并可能触发查询报错 4019 的问题。
- 修复表中包含重复行数据,并行创建唯一索引时可能触发的 Core 问题。
- 修复弱读重试时,强制读 Leader 导致备机流量占用 Leader CPU 的问题。
- 修复在磁盘负载过高的场景下,临时文件 I/O 异常可能导致的集群报错 4184 磁盘满的问题。
- 修复 Merge Join 的内存分配不当,导致 SqlExecutor 模块内存膨胀问题。
- 修复部分时钟跳变场景下,可能导致集群使用异常的问题。
- 优化在线统计信息收集策略,分区表只收集全局统计信息,不收集分区级统计信息,从而缓解 RPC 过大、内存占用高的问题。
- 优化分区数量较大的场景下,重启过程中重新加载配置的耗时时间。
v4.1.0_BP3_HF1
Version information
Information | Description |
---|---|
Release date | August 28, 2023 |
Version | V4.1.0_CE_BP3_HF1 |
OBServer RPM version | oceanbase-ce-4.1.0.2-103010012023082519 |
About this version
This version addressed several issues encountered by customers and discovered during internal testing to improve the product's stability.
Fixed issues
- Fixed an issue where modifying tenant specifications caused a limitation of 100 connections for non-root users.
- Fixed an issue where concurrent access to the
plan_cache_plan_stat
table during the deletion of an execution plan could trigger a core dump. - Added new parameters to control the optional plan paths for the JOIN operator.
Considerations
OceanBase Database Community Edition can be directly upgraded from V4.1.0_CE_BP3_HF1 to V4.2.0_CE_GA but not to V4.2.0_CE_BETA.
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-08-28 |
版本号 | V4.1.0_CE_BP3_HF1 |
OBServer RPM 版本号 | oceanbase-ce-4.1.0.2-103010012023082519 |
发版目的
解决客户及内部测试遇到的问题,提升版本稳定性。
缺陷修复
- 修复变更租户规格,导致非
root
用户连接数受限为 100 个的问题。 - 修复删除执行计划的过程中, 并发访问
plan_cache_plan_stat
表可能触发 Coredump 的问题。 - 新增配置项,用于控制 JOIN 算子可选的计划路径。
注意事项
V4.1.0_CE_BP3_HF1 版本不支持直接升级到 V4.2.0_CE_BETA 版本,但支持升级到 V4.2.0_CE_GA 版本。
v4.2.0_CE_BETA_HF1
Version information
Information | Description |
---|---|
Release date | August 21, 2023 |
Version | V4.2.0_CE_BETA_HF1 |
OBServer RPM version | oceanbase-ce-4.2.0.0-100010022023081817 |
About this version
This version fixes some bugs and improves stability.
Fixed issues
- Fixed an issue where core dump would occur during the startup of OceanBase Database if it was deployed in a CPU environment that does not support Advanced Vector Extensions (AVX) instruction set.
- Fixed an issue where exceptions occurring during the sending of RPC packets could result in all nodes in the cluster becoming inactive.
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-08-21 |
版本号 | V4.2.0_CE_BETA_HF1 |
OBServer RPM 版本号 | oceanbase-ce-4.2.0.0-100010022023081817 |
发版目的
本次发版主要是 BUG 修复,提升版本稳定性。
缺陷修复
v4.1.0_CE_BP3
Version information
Information | Description |
---|---|
Release date | August 14, 2023 |
Version | V4.1.0_CE_BP3 |
Commit number | 694f84c |
About this version
- OBKV supports aggregate functions such as MIN, MAX, and COUNT, auto-increment columns, and row data verification during data insertion.
- The
_ha_get_tablet_info_batch_count
and_ha_rpc_timeout
hidden parameters are added to control the number of tablets obtained by an RPC call at a time and the RPC timeout during operations such as migration, replication, rebuild, and physical restore. If the I/O operations on the SATA disk are slow, you can use the two parameters. - The
DBMS_RESOURCE_MANAGER
system package is provided in the community edition. - Issues encountered by customers and during internal tests are resolved to improve the stability of the product.
Fixed issues
- Fixed an issue that after the
LIMIT pushdown
statement is rewritten, the execution result of a LIMIT clause containing the RAND function is incorrect. - Fixed an issue that if an expression contains functions such as USERENV and SYSDATE, the query result is inaccurate due to an incorrect query range.
- Fixed an issue that in the Prepared Statement (PS) protocol, a
zero datetime
value of the DATETIME type is not fully compatible with MySQL when an OBServer node sends a packet to the client. As a result, the query result on the client of the Go driver is abnormal. - Fixed an issue that when the GROUP BY clause is used in a join of two tables, the returned result set does not meet the expectations.
- Fixed an issue that in a scenario where the cgroup feature is enabled and
sql_nio
is disabled, a core dump may occur due to the use of the PS protocol. - Fixed an issue that if the CPU resources remain exhausted for a period of time, an OBKV request may time out and thereby cause a core dump.
- Fixed an issue that after the character set of a tenant is changed by using the ALTER DATABASE statement, the character set displayed in the
information_schema.SCHEMATA
view is incorrect. - Fixed an issue that when a large number of DDL operations are performed on a single table, the minor compaction threads may be stuck due to too many involved partitions or intensive writes, which results in an out of memory (OOM) error.
- Fixed an issue that after the DOUBLE type is converted into the INT type in a query statement, the query result is inaccurate due to an incorrect query range.
- Fixed an issue that when an INSERT operation is performed in a scenario with a large data volume, a minor or major compaction will trigger a retry of the INSERT operation, which may result in discontinuous auto-increment IDs.
- Fixed an issue that during bypass import, the memory is used up because data of the ObArray type occupies memory of the sys500 tenant.
- Fixed an issue that when too many sessions exist in the
sys
tenant, the client may return the errorsession already exists
. - Fixed an issue that SqlExecutor memory bloats when a tenant with minimum specifications obtains the schemas.
- Optimized the performance in CPU over-allocation scenarios after the cgroup feature is enabled.
Considerations
OceanBase Database Community Edition can be directly upgraded from V4.1.0_CE_BP3 to V4.2.0 GA but not to V4.2.0_CE_Beta.
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-08-14 |
版本号 | V4.1.0_CE_BP3 |
Commit 号 | 694f84c |
发版目的
- OBKV 支持 min、max、count 等汇聚函数,同时支持自增列和插入数据时的行数据校验。
- 新增了两个隐藏配置项
_ha_get_tablet_info_batch_count
和_ha_rpc_timeout
,用于控制迁移复制、Rebuild 和物理恢复等操作中一次 RPC 批量获取 Tablet 的数量和 RPC 超时时间。这些配置项适用于 SATA 盘 IO 较慢的场景。 - 开放
DBMS_RESOURCE_MANAGER
系统包到开源版本。 - 解决客户及内部测试遇到的问题,提升版本稳定性。
缺陷修复
- 修复
limit push down
改写导致的带有 Rand 函数的 Limit 语句结果错误问题。 - 修复表达式中包含 USERENV、SYSDATE 等函数时,Query Range 错误导致查询结果不准确的问题。
- 修复在 PS 协议下,DATETIME 类型的
zero datetime
值在 OBServer 节点给客户端发包时没有完全与 MySQL 兼容,导致 Go 驱动客户端查询结果异常的问题。 - 修复两表 JOIN 使用 GROUP BY 语句时,返回结果集不符合预期的问题。
- 修复在开启 cgroup、关闭
sql_nio
场景下,使用 PS 可能触发的 Core 问题。 - 修复了 CPU 持续打爆的情况下,进行 OBKV 请求操作可能会导致超时并触发的 Core 问题。
- 修复 ALTER DATABASE 修改租户字符集后,
information_schema.SCHEMATA
中字符集展示不正确问题。 - 修复在进行单表大量 DDL 操作时,同时分区数目较多或写入较多可能会触发转储线程卡住导致内存爆满的问题。
- 修复在查询语句中将 DOUBLE 类型转换为 INT 类型后,由于 Query Range 错误导致查询结果不正确的问题。
- 修复在大数量场景下进行 INSERT 操作时,触发某些转储/合并动作导致 INSERT 重试,可能导致自增 ID 跳变的问题。
- 修复在旁路导入时,由于 ObArray 类型使用了 500 租户的内存,导致内存爆满的问题。
- 修复
sys
租户积压场景下可能导致的客户端报错session already exists
问题。 - 优化小规格租户在获取 Schema 过程中,SqlExecutor 内存膨胀问题。
- 优化开启 Cgroup 后,在 CPU 超卖场景下的性能表现。
注意事项
V4.1.0_CE_BP3 版本不支持升级到 V4.2.0_CE_Beta 版本,但支持升级到 V4.2.0 GA 版本。
v4.2.0_CE_BETA
V4.2.0_CE_Beta
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-08-02 |
版本号 | V4.2.0_CE_Beta |
Commit 号 | 8024d8f |
OBServer RPM 版本号 | oceanbase-ce-4.2.0.0-100000152023080109 |
版本定位
OceanBase 数据库 V4.2.0_CE 版本是在 V4.1.0_CE 版本基础上进一步健全完善核心特性,补齐了 V3.x 系列的全部主要功能,提升产品可扩展性,优化资源使用,提高性能,增强兼容性与易用性。目前发布的为 V4.2.0_CE Beta 版本,而后续的 V4.2.x 版本也会作为 长期支持版本(LTS) 对外提供服务。
V4.2.0 版本核心特性如下:
- MySQL兼容
- 函数索引:新版本在 MySQL 模式下也支持了兼容 MySQL 8.0 的函数索引,同时进一步增强了函数索引的使用稳定性。
- OBCDC:行数据支持按照列的定义序输出,满足 MySQL Binlog Service 的兼容性需求。取消系统租户依赖,支持普通租户同步,支持无主键表同步。
- 性能提升
- 优化器/执行器/ PL 能力增强:新版本针对查询改写、查询优化能力做了一系列增强,也重点优化了执行器算子性能。PL 优化了 Plan Cache 和并行执行逻辑,支持 SQL 语句返回复杂数据类型。
- 统计信息强化:增强统计信息功能的稳定性和可用性。同时增加了统计信息收集监控诊断功能,优化了统计信息收集的性能和内存开销。
- 动态采样:支持了优化器动态采样功能,在 SQL 运行时收集统计信息,生成更优的执行计划,提升查询性能。
- 查询计划演进:支持查询计划演进功能,有效避免执行计划性能回退。
- Runtime Filter:完整支持 Runtime Filter,提升 AP 处理性能。
- 4C 小规格性能优化:4C 环境默认参数下,OLTP 各个场景性能提升 20%+。
- 读事务数据性能优化:优化读转储未提交数据时的查事务表性能。
- 事务数据表并行转储:V4.1.0 版本已经支持了并行的 MINOR_MERGE(表示多个 Mini SSTable 合成一个 Minor SSTable),V4.2.0 版本新增支持对事务数据表做并行的 MINI_MERGE(表示冻结 MemTable 通过转储变成 Mini SSTable)。
- 快速随机数据生成:新增
GENERATOR(N)
内置函数,可配合RANDOM([N])
、RANDSTR(N, gen)
随机函数或NORMAL(<mean> , <stddev> , <gen>)
、UNIFORM(<min> , <max> , <gen>)
、ZIPF(<s> , <N> , <gen>)
等分布控制函数使用。相对 MySQL Recursize CTE,Table Generator 具备明显的性能优势。
- OLAP能力
- 只读外表:创建、读取,减少数据入库开销。
- 扩展性增强
- Transfer和负载均衡:采用 Transfer 技术实现日志流的分裂和合并,支持以分区为单位进行跨节点的数据搬迁,提供了灵活的扩缩容能力和数据动态均衡能力。
- 复制表:新版本基于单机日志流的新架构对复制表进行了重构,构建了基于分区的可读版本号校验以及基于日志流的 Lease 授予机制,用于保证强一致性读的正确性。另外,新版本完善了切主不杀事务的能力,在用户或负载均衡发起 Leader 切换时未提交的复制表事务可以在切主后继续执行。相比于 V3.x 版本,V4.2.0 版本的复制表也有着更好的写事务性能和更强的容灾能力,副本宕机对于读操作的影响更低。
- 高可用增强
- 物理备库:OceanBase 数据库 V4.1.0 版本支持了基于归档的主备库,配置灵活且不要求主备租户之间网络。但仍然有不少场景需要基于网络直通的主备库方案,来降低存储及网络成本,缩减备份恢复链路,V4.2.0 版本进行了扩展支持。
- 日志写入限速:日志提交写盘的速度大于转储速度时会导致日志盘满。V4.2.0 版本在日志盘使用量达到一定水位时,通过限制日志提交写盘的速度,来避免写入压力特别大的集群频繁出现日志盘满的现象。相关用法请参考
log_disk_throttling_percentage
/log_disk_throttling_maximum_duration
配置项。
- 资源使用优化
- 空载 CPU 优化:针对高频、耗时长的 SQL、后台线程做了一些针对性的优化,以降低内部 SQL 执行和后台线程定期执行的 CPU 开销。经测试,单个业务租户,30 张压测表,单表数据 100w 行的空载环境下,CPU 默认开销 0.2C 左右。
- 磁盘数据文件按需扩展:支持渐进磁盘扩容方式,先预分配一个合适的磁盘大小,然后根据实际使用情况自动扩容。
- 共享内存识别机制:在技术手段上增加防御机制,对真正预期使用共享内存的代码进行打标,优化随代码合入出现的共享资源增多情况。
- 易用性提升
- Auto DOP:支持 Auto DOP 自动计算查询并行度,降低并行执行使用门槛。
- 全链路诊断能力增强:V4.1.0 版本提供了全链路诊断能力,V4.2.0 版本基于全链路诊断框架, 又补充了部分 Trace 打点信息。同时提供了面向事务+SQL 维度的可交互的 Show Trace 能力。
- 逻辑计划管理:V4.2.0 版本为逻辑计划易用做了很多改进。比如保存 EXPLAIN 计划信息、逻辑计划的执行反馈信息、查询运行中 SQL 的实时计划;提供丰富的 DBMS_XPLAN 包接口,展示指定查询的计划、Baseline 计划、及 Session 的实时计划,并以格式化方式输出。
- 后台线程统计:V4.2.0 之前版本更倾向以客户端为视角,记录前台线程诊断信息。但对OceanBase 数据库来讲,后台线程占了绝大部分,不论排查问题还是诊断性能,都需要了解后台线程的状态。V4.2.0 版本新增视图
[G]V$OB_THREAD
,用于记录全量线程的状态信息。
- 国家标准
GB18030-2022 字符集:OceanBase 数据库在 V4.2.0 版本开始支持 GB18030-2022 字符集。GB18030-2022 在 2022 年 7 月 19 日发布,2023 年 8 月 1 日正式实施,支持了更多的生僻汉字及少数民族文字,成为信息系统的全文强制执行标准。
- 产品形态
- 产品主备库:V4.1.0 支持了单机形态,V4.2.0 补充支持单机主备库形态。
- 只读副本(R 副本):V4.2.0 版本补齐了只读副本功能,区别于全功能副本,提供只读能力。
关键特性说明
MySQL兼容
支持函数索引: MySQL 8.0 新增函数索引功能,主要用于优化查询语句的性能。通常情况下,如果对查询列使用了函数或表达式,那么无法使用普通的索引进行优化,需要使用函数索引来提高查询性能。函数索引可以将函数的返回值作为索引的一部分,从而加快查询速度。OceanBase 数据库 V4.2.0 版本开始也在 MySQL 租户下支持了 MySQL 8.0 兼容的函数索引,支持通过 create table/create index/alter table
等语句创建。另外,V4.2.0 版本也强化了索引的抽取能力,在索引表达式外层存在隐式转换、前缀索引的引用列上存在 Like 谓词等多数场景可以有效使用到索引。更多信息请参见 创建索引。
性能提升
统计信息强化
V4.0.0 版本之后统计信息的收集完全由 SQL 层发起和维护,合并时不再收集统计信息。但由于统计信息收集功能不够完善,在收集的性能和内存消耗上等方面存在一些问题,进一步影响到 SQL 计划的生成。同时由于统计信息的收集缺乏有效的监控手段,用户难以确定各个数据表上统计信息收集的状态、是否过期等信息,会造成运维困难。V4.2.0 版本重点增强了统计信息功能的稳定性和可用性。在线统计信息收集优化了数据结构和收集性能,INSERT INTO SELECT
和 LOAD DATA
两种导数方式使用在线统计信息收集时性能提升 10% 左右。离线统计信息收集优化了计划生成路径和内存使用,在 tpcds_100g 分区表、64 并发离线收集场景,性能提升 10%-20%。另外还支持了统计信息收集监控诊断,新增 [G]V$OB_OPT_STAT_GATHER_MONITOR
动态性能视图用于查询统计信息收集任务实时状态,新增 DBA_OB_TASK_OPT_STAT_GATHER_HISTORY
字典视图用于查询历史收集任务执行情况,新增 DBA_OB_TABLE_OPT_STAT_GATHER_HISTORY
字典视图用于查询表的历史收集执行情况。
动态采样
在执行 SQL 查询时,OceanBase 数据库优化器需要收集表和索引的统计信息,以便能够选择最佳的执行计划。如果统计信息不准确或者不完整,使用的执行计划就可能不是最优的,导致查询性能下降。基础的统计信息通常是通过自动收集或者手动收集等方式获取到。但是,如果数据分布发生变化,没有收集统计信息或者遇到一些复杂的 SQL 查询,统计信息就可能不再准确。V4.2.0 版本提供了动态采样功能,在计划生成阶段针对数据库对象进行提前采样,通过采样的方式进行行数估计,从而用于代价模型中,生成更好的执行计划。目前提供了系统变量、查询 HINT 及系统配置项三种方式进行动态采样功能的控制,同时采样集的大小受限于并行度的控制。更多信息请参见 优化器动态采样。
Runtime Filter
OceanBase 数据库自 V3.1.0 版本以来, 支持了 Join Bloom Filter 用于在 Join 中执行期扫描数据时快速过滤数据, 在 V4.0.0 版本上对于 Join 键为分区列或者分区列前缀场景支持了Partition Bloom FIlter可以动态过滤分区,在 V4.1.0 版本支持了多发 Bloom Filter 使得相邻 DFO 和单个 DFO 内部均可以生成多对 Bloom Filter。 In/Range/Bloom Filter 这一类在执行期动态过滤数据的 Filter 统一称为 Runtime Filter(RF),V4.2.0 版本完整支持了 Runtime Filter,提升 AP 处理性能。可以通过px_join_fitler / px_part_join_filter
来手动打开 runtime filter/part filter
;通过no_px_join_filter / no_px_part_join_filter
来手动关闭 runtime filter/part filter
。并提供了 4 个系统变量用于在需要场景下调整 Runtime Filter 执行相关策略。更多信息见 Runtime Filter。
4C 小规格性能优化
结合自增 ID 优化、New Sort 自适应优化、PDML 场景下 Callback Allocator 优化、时间函数调用优化、单日志流语句快照获取优化、租户级别获取优化、enable_trace_log
/enable_sql_audit
优化等优化手段,V4.2.0 版本对 4C16G 小规格场景的 Sysbench 压测性能提升 20%+。
快速随机数据生成
Table function 是一种能够返回一张数据表作为结果的函数。在此基础上,V4.2.0 版本新增 Table Generator 功能,即 generator(N)
内置函数,并允许在 Table Function 中调用它,表现为 table(generator(N))
。同时新增 RANDOM([N])
、RANDSTR(N, gen)
随机函数,和 NORMAL(<mean> , <stddev> , <gen>)
、UNIFORM(<min> , <max> , <gen>)
、ZIPF(<s> , <N> , <gen>)
分布控制函数,与 Table Generator 配合使用生成数据。相对 MySQL Recursize CTE,Table Generator 具备明显的性能优势。更多信息请参见 GENERATOR。
OLAP 能力
只读外表
数据库中的表会存放于数据库的存储空间中,而外表的数据存储于外部存储服务中。外部表可以像普通表一样查询,但局限于读,不能执行 DML 操作。通常情况下,处理外部数据,需要先通过 ETL 工具将数据导入数据库。在这个过程中,数据库需要消耗存储空间、磁盘 I/O 和 CPU 等资源。而外部表省略了数据导入的流程,可以直接读取外部数据源进行查询分析。使用方法和限制见 创建外表。
扩展性增强
Transfer 和负载均衡
OceanBase 数据库 V4.0.0 版本进行了架构升级,引入了自适应日志流概念,目标是实现单机分布式一体化架构,提供更加灵活的扩展性能力,支持单机和分布式形态的动态变换。已发布的 V4.1.0 版本在扩展性能力方面还不够完善,分区和日志流是静态的绑定关系,不支持动态调整分区分布,从而限制了自动负载均衡的能力,不支持部署形态的灵活变换。OceanBase 数据库 V4.2.0 版本是首个完整实现单机分布式一体化架构的版本,采用 Transfer 技术实现了日志流的分裂和合并,支持了以分区为单位进行跨节点的数据搬迁,完善了可扩展性能力,真正实现了单机和分布式形态的动态变换。租户级别的负载均衡特性主要体现在以下两个方面:
- 租户水平扩缩容:用户通过动态调整 Unit Number(每个 Zone 上提供服务的 Unit 个数)和 Primary Zone(提供读写服务的 Zone 列表),可以实现租户的读写服务能力在 Zone 内和 Zone 间的水平扩缩容。负载均衡模块将根据用户服务能力的配置自适应调整日志流和分区分布。
- 分区均衡:在表和分区动态变化的情况下,通过动态调整分区分布,实现分区个数以及存储空间在服务节点上的均衡。
更多信息请参见 负载均衡。
复制表
复制表是 OceanBase 数据库的一种特殊表,可以在任意一个 “健康” 的副本上读取到数据的最新修改。对于写入频率较低、更关心读操作延迟和负载均衡的用户来说,复制表是一个很好的选择,在牺牲小部分事务提交性能的前提下复制表可以在任意一个 “健康” 的 Follower 上读到最新数据。此处所提到的“健康”是指 Follower 与 Leader 之间的网络通畅、回放进度差距不大。在 V3.2.0 版本中,OceanBase 数据库已经支持复制表功能,通过复制表可以在指定租户的每台机器上都有一个备副本,并且主副本与所有备份的数据使用全同步策略保持强同步。V4.2.0 版本的复制表相较于旧版本又做出了一些改进,完善了切主不杀事务的能力,在用户或负载均衡发起 Leader 切换时,可以在切主后继续执行。同时,新版本的复制表也有着更好的写事务性能和更强的容灾能力,副本宕机对于读操作的影响更低。
更多信息请参见 创建表。
高可用增强
物理备库
V4.1.0 版本支持了基于三方介质归档的主备库,该方案解决了主备库基本需求,并且配置灵活,比如不要求主备租户之间网络互通等。但是相比网络直连备库存在一些劣势,比如存储以及网络成本上升、性能以及稳定性上的损耗、运维难度上升、使用限制如 Switchover 要求备库先开启归档等。从这些方面考虑,基于网络直通的物理备库缩短了主备库间日志同步链路,对单机用户、中小用户等更加友好。另外考虑备库通信的可用带宽限制和不稳定性因素,V4.2.0 版本也支持了备库限速能力,避免在网络带宽受限制时部分备库流量占用过高影响其他节点的情况。物理备库具体使用方式见 物理备库概述。
资源使用优化
磁盘数据文件按需扩展
OceanBase 数据库采用预分配磁盘空间的策略,好处是可以保证占有一段尽可能连续的磁盘空间,避免其他应用程序对磁盘的抢占引起的磁盘资源不足,并且可以在其基础上定制文件系统,提高数据访问效率。但用户数据量很小的情况下,会存在磁盘空间浪费的情况。V4.2.0 版本新增加一种渐进磁盘扩容的用户配置选项,即预分配一个合理的磁盘大小,根据磁盘的实际使用情况自动感知并扩容,降低磁盘开销具体使用方式见 配置磁盘数据文件的动态扩容。
易用性提升
Auto DOP
并行执行是优化大数据量查询的关键能力,优化器中一般会使用并行度(DOP:Degree of Parallel)来描述并行资源量。在实际业务场景中,是否需要开启并行以及所需的 DOP 大小,历史版本需要考虑执行情况、业务响应时间要求、系统资源等,靠经验通过系统变量或 HINT 来手工调整。在保留手工调整并行度能力的基础上,V4.2.0 版本新增 Auto DOP 功能,在生成查询计划时评估查询需要执行的时间,自动确定是否开启并行,以及对当前查询合适的并行度。并可通过系统变量 parallel_degree_policy
控制 DOP 选择策略。更多信息见 Auto DOP。
全链路诊断能力增强
OceanBase 数据库 V4.2.0 版本在诊断能力上有了显著提升,其中包括首次实现对 SQL 请求的可视化全链路追踪,能够帮助用户快速追踪并定位具体问题发生在哪个执行阶段、哪台机器以及哪个模块,并提供具体的执行信息。提供了面向用户的事务 + SQL 维度的 Show Trace 能力。对于业务部门而言,更关心的往往是一笔业务服务总的耗时情况。例如在 OLTP 系统中,一笔业务服务一般由一个或多个事务组成。因此,我们把事务作为追踪单位会更贴合用户的实际业务,一个事务形成一个追踪的 Trace,并对事务中每条 SQL 请求记录 OBClient > ODP > OBServer 内部全链路过程中相关执行信息,用户可以通过一个 Trace 快速找到该事务执行了哪些语句,以及这些语句从客户端视角看到的执行情况。Show Trace 也可以为用户提供便捷的业务系统关联能力,用户通过 JDBC 接口/ SQL 接口,能够在业务数据库连接上设置调用请求对应的 app trace id
, 该 app trace id
会记录到 OceanBase 数据库全链路追踪对应的信息中, 并在 Show Trace 中展示出来。当用户发现某个 app trace id
对应的请求或服务数据库调用有报错时, 可以使用该 app trace id
在全链路诊断系统中快速搜索到对应的 app trace id
关联的数据库 Trace,然后直接查看该请求在数据库链路中各阶段耗时情况及报错点,快速确定触发问题的组件。更多信息见 全链路追踪展示。
逻辑计划管理
V4.2.0 版本在逻辑计划管理方面做了很多增强功能,包括:
- 通过 EXPLAIN 语法获取某条查询的计划信息后,在当前 Session 未断开之前,用户可以通过 DBMS_XPLAN.display 查询历史,或者可以通过 EXPLAIN INTO 语法指定保存到目标表。
- 自动保存执行过的所有查询的计划,包括物理计划以及逻辑计划,方便后续排查问题。重启集群时,数据库会清理保存的查询计划。
- 通过
DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE
查看 SPM 的基线计划。 - 通过
DBMS_XPLAN.DISPLAY_ACTIVE_SESSION_PLAN
和SESSION_ID
查看执行中的查询的计划信息。
更多信息见 DISPLAY_ACTIVE_SESSION_PLAN。
国家标准
GB18030-2022 字符集
GB18030-2022 在 2022 年 7 月 19 日发布,2023 年 8 月 1 日正式实施,并成为信息系统的全文强制执行标准。与 GB18030-200...
v4.1.0_CE_BP2
Version information
Information | Description |
---|---|
Release date | Jun 15, 2023 |
Version | V4.1.0_CE_BP2 |
Commit number | 43bca41 |
OBServer RPM version | oceanbase-ce-4.1.0.1-102000042023061314 |
About this version
- This version includes compatibility with MySQL's
SHOW CREATE TABLE
statement to meet the needs of related tools. - User and internal testing issues are also addressed to improve version stability.
Fixed issues
- Fixed an issue where querying the
TABLE_CONSTRAINTS
view would fail when the system variablelower_case_table_names
was set to 0. - Fixed an issue where refreshing the schema after system restart with a large number of partitions caused Proxy to hang when establishing a connection.
- Fixed an issue where data write operations reported error 4017 due to reference count leakage after inserting over 1 billion rows into an unpartitioned table with no primary key.
- Fixed an issue where large transactions involving full table updates continued to report error 4138.
- Fixed compatibility issues with the ObDDLStartLog structure that could cause failures when upgrading from V4.0.0_CE and V4.0.0_CE_BP1 to later versions.
- Fixed an issue where excessive memory was used by SQL Audit during cluster data playback after restart.
- Fixed an issue where abnormal column equal encoding resulted in data exceptions.
- Fixed an issue where core dump might be triggered when
timezone info
is modified concurrently. - Added support for complete compatibility with MySQL's
SHOW CREATE TABLE
statement by setting the session variable_show_ddl_in_compat_mode
.
Considerations
-
If you are using V4.0.0_CE or V4.0.0_CE_BP1, we recommend that you upgrade directly to V4.1.0_CE_BP2 to avoid possible log playback compatibility issues during the upgrade process.
-
If you have unpartitioned tables with large amounts of data and no primary keys, we recommend that you upgrade directly to V4.1.0_CE_BP2 to avoid potential errors that may occur during data write operations.
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-06-15 |
版本号 | V4.1.0_CE_BP2 |
Commit 号 | 43bca41 |
OBServer RPM 版本号 | oceanbase-ce-4.1.0.1-102000042023061314 |
发版目的
- SHOW CREATE TABLE 兼容 MySQL 以满足周边工具需求。
- 解决用户及内部测试遇到的问题,提升版本稳定性。
BUG 修复
- 修复系统变量
lower_case_table_names
设置为 0 时,查询TABLE_CONSTRAINTS
视图失败的问题。 - 修复分区数特别多的场景下,宕机重启后刷新 Schema 较慢导致 Proxy 建立链接卡住的问题。
- 修复无主键表单分区累计插入 10 亿多行数据后,引用计数泄漏导致的数据写入操作报 4017 错误的问题。
- 修复全表更新的大事务场景下,持续报 4138 错误的问题。
- 修复 V4.0.0_CE 和 V4.0.0_CE_BP1 版本升级到后续版本时,由于 ObDDLStartLog 结构体的兼容性问题,可能导致的升级失败问题。
- 修复重启集群数据回放时,SQL Audit 占用内存不合理的问题。
- 修复列间等值编码异常导致的数据异常问题。
- 修复了并发修改
timezone info
可能触发的 core 问题。 - 支持通过设置 Session 变量
_show_ddl_in_compat_mode
,使 SHOW CREATE TABLE 返回信息与 MySQL 完全兼容。
注意事项
- 建议在使用 V4.0.0_CE 或 V4.0.0_CE_BP1 版本的用户直接升级到 V4.1.0_CE_BP2 版本,以避免在升级过程中可能出现的日志回放兼容性问题。
- 建议存在无主键表单分区表且数据量较大的用户,直接升级到 V4.1.0_CE_BP2 版本,以避免在写入数据时可能出现的报错问题。
v3.1.5_CE_HF1
Version information
Information | Description |
---|---|
Release date | Jun 19, 2023 |
Version | V3.1.5_CE_HF1 |
Commit number | b4c6e7b |
OBServer RPM version | oceanbase-ce-3.1.5-100010012023060910 |
About this version
This version fixes some bugs and improves stability.
Fixed issues
- Fixed an issue that the
PARAM INFO
field of the__all_virtual_plan_stat
table was not deeply copied, which resulted in the generation of a core dump file in the case of access to an invalid memory address. - Fixed an issue where an excessive number of rows were returned by the TABLE LOOKUP operator in the table access by index primary key operation, which resulted in the generation of a core dump file in the case of access to an invalid memory address.
- Fixed an issue where partition pruning was not supported when a time type column was used as a partitioning key and the query condition was not an equation.
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-06-19 |
版本号 | V3.1.5_CE_HF1 |
Commit 号 | b4c6e7b |
OBServer RPM 版本号 | oceanbase-ce-3.1.5-100010012023060910 |
发版目的
本次发版主要是 BUG 修复,提升版本稳定性。
BUG 修复
v4.1.0_CE_BP1_HF1
Version information
Information | Description |
---|---|
Release date | May 19, 2023 |
Version | V4.1.0_CE_BP1_HF1 |
Commit number | f7379b2 |
OBServer RPM version | oceanbase-ce-4.1.0.0-101010022023051821 |
About this version
This version fixes some bugs and improves stability.
Fixed issues
- Fixed the data exceptions caused by inter-column equidistant encoding.
- Fixed the possible data write failures caused by
tablet_id
change in theTRUNCATE TABLE
scenario.
版本信息
项目 | 描述 |
---|---|
发布日期 | 2023-05-19 |
版本号 | V4.1.0_CE_BP1_HF1 |
Commit 号 | f7379b2 |
OBServer RPM 版本号 | oceanbase-ce-4.1.0.0-101010022023051821 |
发版目的
本次发版主要是 BUG 修复,提升版本稳定性。