OceanBase is an enterprise distributed relational database with high availability, high performance, horizontal scalability, and compatibility with SQL standards.
OTHER License
Bot releases are hidden (Show)
Published by Fireatoms almost 2 years ago
信息 | 描述 |
---|---|
发布时间 | 2022-12-12 |
版本号 | V3.1.4 BP2 |
提交号 | 0fda7c08f44ba23dcaf64ce7689b196ab046f7fb |
修复bug:租户数超过32个observer 重启失败的问题;#1228
Informarion | Description |
---|---|
发布时间 | 2022-12-12 |
版本号 | V3.1.4 BP2 |
提交号 | 0fda7c08f44ba23dcaf64ce7689b196ab046f7fb |
Published by Fireatoms almost 2 years ago
项目 | 描述 |
---|---|
发布日期 | 2022-12-09 |
版本号 | V4.0.0.0 BP2 |
commit号 | 58fdb0ef1a9b589ef05e56c1ede65e951986d996 |
本次发版主要是BUG修复。
Information | Description |
---|---|
Release date | 2022-12-09 |
Release number | V4.0.0.0 BP2 |
Commit number | 58fdb0ef1a9b589ef05e56c1ede65e951986d996 |
To provide better services to community users, OceanBase Community Edition V4.0.0.0BP2 optimizes the database to make it more stable based on the feedback on applications of the community project.
Published by LINxiansheng almost 2 years ago
This version fixed one bug.
本次发版主要是BUG修复。
Published by LINxiansheng almost 2 years ago
OceanBase 社区发布 V4.0.0 版本是对分布式数据库系统架构设计的全面升级,定位为 Beta 测试版本,社区会关注用户使用反馈,不断对产品进行打磨和完善,应用项目投产上线需要慎重审视和仔细评估。
OceanBase V4.0 版本在保证功能特性不丢失的前提下,重新审视了数据库与分布式系统两个领域最基础的设计,全新推出业内首个单机分布式一体化架构,重点构建 HTAP 和云化两个基础能力属性。与此同时,本版本也从架构上解决了 V3.2 版本的设计瓶颈,支持更多用户业务关注的多个核心能力,在内核功能、兼容性、稳定性、性能上取得突破。
信息 | 描述 |
---|---|
发布时间 | 2022-11-02 |
版本号 | V4.0.0_CE |
提交号 | 6af7f9ae79cd0ecbafd4b1b88e2886ccdba0c3be |
本版本的核心能力特性如下:
架构升级与受益
支持单机分布式一体化架构,包含自适应日志流、支持超大事务、RTO 时间降低到 8s 以内、NTP 服务依赖优化、支持分区数量能力上限等版本基础核心能力构建。
内核能力增强
Online DDL 能力增强,支持租户级备份,字符集扩展,支持数据编码,支持 IOPS 隔离,LOB 规格上限扩展,支持表锁和死锁检测等。
兼容性增强
支持 DDL 语句的外键约束,支持视图列信息展示,支持 DML 触发器,支持更多 SQL MODE 和函数等。扩展支持 SEQUENCE 对象,支持存储程序,支持 SQL 文本中的预处理,支持自增列做为分区键。
性能大幅提升
SYSBENCH 性能优化,综合读写性能(Read Write)1024 并发测试性能相比于 V3.1 版本提升 1 倍。
TPCH 查询性能优化,100GB 数据量顺序执行 22 条 SQL,整体性能相比于 V3.1 版本提升 5 倍。
运维能力提升
支持全链路追踪,支持 SESSION 状态的监控和诊断(ASH),标准化视图优化,支持 Schema History 回收功能,支持自动清空回收站功能等。
自适应日志流介绍
OceanBase 早期版本的架构体系里以分区为基本单元进行操作,当系统内的分区数量达到一定程度之后,以分区为单元的操作的消耗也随之增大,逐渐形成了 OceanBase 的使用痛点:单节点支持的分区数量受到限制,单节点上涉及跨分区的数据修改也需要两阶段提交协议来保证事务的原子性等问题。
日志流是由 OceanBase 自动创建和管理的实体,它代表了一批数据的集合,包括若干分区和有序的 Redo 日志流。在新的系统架构下,一个 Unit 内的所有分区的事务修改日志可以都记录在一个日志流中,通过日志流把修改同步到其他 Zone 的对应 Unit 上。OceanBase 的每个租户每有一个 Unit,就会有一个对应的日志流。系统会把一个日志流和其所对应的分区关系固定下来,只有迁移发生时,才会改变这个对应关系。
支持超大事务
基于新的自适应日志流架构,对事务引擎进行重新设计,解决了分布式数据库普遍的大事务场景使用痛点,比如事务大、参与者数量多、事务提交卡等问题。新事务引擎能稳定应对在线业务、批处理、订正数据等多种业务场景,使得用户在各自繁杂的业务场景下可以放心的使用数据库。
RTO < 8s
基于全新的自动选主协议以及全面的探活机制,进一步将机器故障场景下系统恢复时间降低到 8s 以内,帮助业务系统更快恢复,最大程度减少业务影响,给业务带来持续可用的能力。
NTP 服务优化
基于全新的自动选主协议,取消了对 NTP 时钟的依赖,打破原来早期版本对所有节点的时钟偏差控制在 100ms 以内的强需求。OceanBase V4.0 版本允许的时钟偏差可以达到 2s,同时支持动态修改时钟,不会对数据正确性和集群稳定运行带来影响。
优化分区能力上限
在自适应日志流的架构设计下,系统内部一个 Unit 内的所有分区共享一个资源组,大大降低了早期版本每个分区独立申请保存系统资源,提升系统资源的利用率,因此不再需要根据配置限制 OBServer 节点的分区上限个数,但分区上限仍受机器可用物理资源限制。
Online DDL 能力增强
在 OceanBase 早期的版本中,由于架构设计上的限制,对数据库 Online DDL 能力进行了有限支持,例如不支持主键修改操作给业务使用带来了诸多不便。得益于新版本一体化的架构设计,OceanBase 针对涉及到数据搬迁的 Online DDL 操作进行增强支持,主要包括:
支持添加主键、修改主键和删除主键
支持添加外键、删除外键
支持修改列名和列类型,包括字符、数值、日期等类型的相互转换
支持普通表转换为分区表
支持在线修改表或列的字符序
支持租户级备份
多租户是 OceanBase 的核心价值能力之一,在大多数客户系统中,用户都选择在同一个集群中创建了多个租户,每个租户代表一个业务单元,根据业务的不同种类和对客户的重要程度,需要有不同的备份频率和策略进行细粒度支持。在 OceanBase V4.0 版本中将集群级别粒度的备份能力细化拆分到租户级别粒度,支持按租户级别的备份,也支持将备份数据恢复到新租户。优化数据备份快照保留策略,减少备份期间的磁盘空间影响。同时拆分数据备份与日志备份存储目录,支持分别接入不同性能的备份介质。
有关租户级备份的更多详细信息,参见 备份恢复
扩展更多字符集
支持 UTF8、UTF16、GBK、GB18030 和 BINARY 字符集,新增支持 UTF8MB4_BIN、UTF16_BIN、GBK_BIN、GB18030_BIN、UTF8MB4_GENERAL_CI、 UTF16_GENERAL_CI、GBK_CHINESE_CI和GB18030_CHINESE_CI 排序规则。
向量化引擎开源
OceanBase 在商业版 V3.2.3 全面实现了向量化引擎,以 Architecture aware 的设计改造了全部的算子和绝大部分常用的执行表达式,充分发掘现代 CPU 的 cache 特性以及优化指令,并应用于 TPC-H 的 benchmark 中。向量化带来了大量的算法优化可能,通过在向量化的框架下进行算法和数据结构优化,实测整体执行性能相比原先非向量化执行引擎性能提升普遍在 4-5 倍,很多算子和单场景可获得 10 倍以上的性能提升。在本次版本发布中,OceanBase 将其向量化引擎能力全部开源,帮助用户在 OLAP 场景下获取更好的性能。
数据编码开源
OceanBase 通过数据编码压缩技术实现了数据的高压缩比,是帮助用户减小存储成本重要技术手段。OceanBase 本次开源多种数据编码方法,包括字典编码、RLE 编码、常量编码、差值编码、前缀编码、列间编码等,并支持每一列自动选择最合适的数据编码。通过编码和压缩,使用相同的块大小(16KB)、以及相同的压缩算法(lz4),同样的数据存放在 OceanBase 中,要比在 MySQL 5.7 中平均节省一半的空间,同时没有损失任何查询性能。
有关数据编码的更多详细信息,参见 数据压缩与编码
支持 IOPS 隔离
OceanBase 早期的版本已经支持了租户级别的 CPU 和内存隔离,V4.0 版本开始支持租户间 IOPS 隔离,租户之间彼此感知不到对方对磁盘带宽的占用,避免租户间业务的 IO 资源争抢,实现完备的租户资源隔离能力。
用户通过 UNIT CONFIG 设置 UNIT 的资源规格,其中 MIN_IOPS、MAX_IOPS、IOPS_WEIGHT 是 IOPS 隔离相关资源,租户的可用资源与 UNIT 绑定。通知支持动态调整租户的 IOPS 规格,修改 UNIT CONFIG 中的 IOPS 相关设置即可实时生效。在租户内部,支持通过配置项 io_category_config 分配各类别 IO(业务请求、系统日志等)请求的百分比,进而细粒度控制 IO 资源分配与调度。
LOB 规格上限扩展
在 OceanBase 早期的版本中,LOB 数据存储大小限制在 48MB 以内,这对客户使用 LOB 带来了强约束限制。在本次架构升级中,通过存储层将 Lob 宏块的数据拆成多条 Lob Meta 进行存储,取数据的时候再将多条 Lob Meta 中的数据聚合成一个连续 Buffer 返回给 SQL 层处理,这样突破了数据存储大小的限制,使得 LOB 存储上限扩展达到了 512MB,后续将持续优化到 TB 级别。
支持表锁和死锁检测
表锁允许业务以指定的方式锁定表或分区,避免业务并发操作造成数据破坏。在 OceanBase V4.0 版本中支持了 Online DDL 操作,因此必须配套表锁保护 DDL 与 DML 并发时的正确性问题。新增支持 LOCK TABLE 语法,支持 SHARE 和 EXCLUSIVE 两种锁定模式,同时支持对锁冲突的死锁检测。
支持 DDL 语句的外键约束
OceanBase 数据库默认开启外键约束检查,外键约束检查开关由租户变量 FOREIGN_KEY_CHECKS 来控制,要求约束的列的值取自于另外一个表的主键列。在早期的版本中,外键约束检查仅对 DML 操作有效,DDL 操作不受影响。OceanBase V4.0 版本中支持了 FOREIGN_KEY_CHECKS 系统变量对 DDL 部分的影响,其行为保持与 MySQL 兼容。
支持视图列信息展示
在 MySQL 数据库中,视图列信息和表列信息一样,被作为基础的元信息被存储在数据字典中,并通过 INFORMATION_SCHEMA.COLUMNS 显示给用户。OceanBase 数据库内部仅对表列信息进行了持久化存储,V4.0 版本通过采用动态解析视图定义的方法,避免了对视图复杂的依赖关系解析,实现在 INFORMATION_SCHEMA.COLUMNS 中展示视图列信息。
SQL Mode 扩展支持
扩展支持 MySQL 默认开启的 SQL Mode,新增支持 NO_ZERO_DATE、ERROR_FOR_DIVISION_BY_ZERO 和 NO_AUTO_CREATE_USER 三个 SQL Mode,产品行为与 MySQL 兼容。针对 NO_ENGINE_SUBSTITUTION 仅支持语法兼容。
支持 SQL 文本中的预处理
支持 SQL 文本中的预处理语句(Prepared Statements),Prepared Statements 接口使用二进制协议相比交互式SQL 接口具有更高的执行效率,使用方法大体如下:
PREPARE 准备执行语句。PREPARE stmt1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2))';
EXECUTE 执行准备好的语句。SET @a = 3; SET @b = 4; EXECUTE stmt1 USING @a, @b;;
DEALLOCATE PREPARE 释放一个准备好的语句。DEALLOCATE PREPARE stmt1;
支持自增列做为分区键
例如:
create table t2(inv_id bigint not null auto_increment ,c1 bigint, primary key (inv_id) ) partition by hash(inv_id) partitions 8;
使用自增列作为分区键时需要额外注意,自增列的值全局唯一,但在分区内不保证始终增长,和原生 MySQL 行为不同。和其他分区方式相比,对这类分区表的插入操作性能会有一定的下降。
支持 SEQUENCE 对象
扩展支持 SEQUENCE 对象,满足业务系统对 SEQUENCE 对象的依赖诉求,降低客户在业务迁移过程中的适配复杂度。支持 CREATE/ALTER/DROP SEQUENCE 对象,支持获取 CURRVAL、NEXTVAL 和重置取值等对象操作,支持的对象取值范围从 INT64_MIN 到 INT64_MAX。
支持存储程序
支持兼容 MySQL 5.7 语法的存储程序(包含存储过程和存储函数),支持游标、流程控制语句、异常处理、存储程序相关的DDL操作和视图和状态查询。同时扩展支持多个系统包,例如 DBMS_STATS、DBMS_SESSION 等。
支持 DML 触发器
支持在表上创建触发器,兼容 MySQL 5.6 语法。当在该表上 DML 操作满足条件时、触发用户自定义行为。
支持更多函数
支持函数 ADDTIME(),将指定的时间间隔添加到给定的日期和时间。例如:SELECT ADDTIME('2007-12-31 23:59:59.999999', '1 1:1:1.000002');
支持函数 DAYNAME(),返回给定日期的工作日名称。例如:SELECT DAYNAME('2018-01-8');
支持聚合函数 BIT_AND()/BIT_OR()/BIT_XOR(),返回表达式的按位与/或/异或的运算结果。
新增函数 UUID_SHORT(),返回 64-bit 无符号整数。例如:SELECTUUID_SHORT();
支持全链路追踪
OceanBase 作为一款久经沙场的分布式数据库,其内部数据访问的链路已经非常复杂,当线上出现超时等问题的时候,往往无法有效快速定位问题出现的第一现场,需要依靠有经验的运维人员对追个环节进行排查,验证影响到运维效率和故障影响速度。OceanBase V4.0 版本设计了一套全链路追踪的机制,能够提升全链路问题定位的效率,贯穿从业务 APP > 客户端驱动(JDBC, OCI) > 代理(OBProxy)> 数据库节点(OBServer)到全部流程,用户通过 PL/SQL 或 OBClient 接口在应用程序 APP 中设置相关标识信息(MODULE/ACTION/CLIENT_INFO/CLIENT_IDENTIFIER)到正在使用的链接中,运维人员可以通过 PL/SQL 程序包,控制相关应用程序设置的标识信息维度是否打开全链路跟踪诊断以及设置诊断输出策略;诊断日志以 OpenTracing 数据模型输出到 OBProxy 和 OBServer 日志文件中进行保存, 通过对诊断日志解析, 即可达到追踪每个 SQL 每个事务在全链路中执行耗时等相关诊断信息。
有关全链路追踪的详细介绍,参见 全链路追踪
支持 SESSION 状态的监控和诊断(ASH)
OceanBase 数据库早期版本已经支持获取当前正在执行的 SQL 的状态信息,包括等待事件等信息,但只能通过 __all_virtual_session_wait 查询到 session 最近一次等待事件。OceanBase V4.0 版本支持更全面的 session 与等待事件之间的关系图(ASH),不仅包含当前执行的 SQL 的状态,还包含 SESSION、USER、SQL、WaitEvent 等多个维度状态历史信息。ASH 能够以 1s 为周期采样系统中所有 Active Session 状态,采用过程中全程不加锁不影响业务 SQL 的正常执行。OCP 通过对这些状态采样信息进行综合汇总分析,帮助用户了解过去一段时间里系统的负载以及等待状态,及时发现并预警问题。
支持实时执行计划监控
OceanBase 在 SQL 执行计划的诊断中引入了 SQL Plan Monitor, SQL Plan Monitor 提供了关于逻辑执行计划、物理执行计划、算子吐行数、算子开始/结束时间点等信息, SQL Plan Monitor 信息只能在 SQL 执行完毕后获得,可以通过 GV$SQL_PLAN_MONITOR 租户级视图获取相关信息。OceanBase V4.0 版本支实时 SQL Plan Monitor,可以实时的查看当前租户各 SQL 执行计划状态,在客户实际业务场景或者是诊断分析场景, 如果存在 SQL 卡住的问题, 此时通过实时 SQL Plan Monitor 也可以查询各个执行线程执行算子的执行状态。
支持 Schema History 回收功能
解决 Schema History 只增不删导致 Schema History 过多,影响 OBServer 启动慢的问题。通过隐藏配置项 _schema_history_recycle_interval 控制 Schema History 回收周期,该配置项缺省值是 0,表示关闭 schema history 回收功能。
支持自动清空回收站功能
OceanBase 数据库回收站提供以租户为单位,当磁盘空闲空间不足时,按照 FIFO 策略,自动清理回收站空间的功能。增加配置项 recyclebin_object_expire_time 用于指定回收站中对象的过期时间。
测试环境规格:
CPU 平台架构 | x86_64 |
---|---|
ECS 类型 | ecs.g7.8xlarge |
计算资源 | 32核 |
内存资源 | 128GB |
磁盘资源 | 500G ESSD云盘 |
操作系统 | CentOS Linux release 7.9.2009 (Core) |
测试版本:
产品 | 版本信息 |
---|---|
OBServer (V4.0.0_CE) | observer (OceanBase_CE 4.0.0.0)REVISION: 100000152022102115-06570c6f755c1fabe3ca9a25bef54af77e7c8c9cBUILD_TIME: Oct 21 2022 17:22:38 |
OBProxy (V4.0.0) | obproxy (OceanBase 4.0.0 2)REVISION: 1-local-b1ef5a6b5b196916ae26bdea814765e5165a801fBUILD_TIME: Oct 22 2022 11:06:04 |
测试方案:
通过 OBD 部署 OceanBase 集群,ODP 和 Sysbench 单独部署在一台机器上, 作为客户端的压力机器。
OceanBase 集群规模为 1:1:1,部署成功后先新建跑 Sysbench 测试的租户及用户(sys 租户是管理集群的内置系统租户,请勿直接使用 sys 租户进行测试),设置租户的 Primary Zone 为 RANDOM,RANDOM 表示新建表分区的 leader 随机到这 3 台机器。
启动 Sysbench 客户端,进行 point_select、read_write、read_only 和 write_only 测试。
每轮测试 --time 设置为 60s,线程数取值可以为 32/64/128/256/512/1024。
测试数据量为 30 张非分区表,100 万行数据,即 --tables=30,--table_size 设置为 1000000。
租户规格:
MAX_CPU = 26
MEMORY_SIZE = 70g
测试结果:
Point Select 性能
Threads | V4.0.0_CE QPS | V4.0.0_CE 95% Latency (ms) | V3.1.0_CE QPS | V3.1.0_CE 95% Latency (ms) |
---|---|---|---|---|
32 | 180360.71 | 0.21 | 139124.75 | 0.28 |
64 | 312254.88 | 0.26 | 232522.69 | 0.36 |
128 | 473423.04 | 0.41 | 322185.31 | 0.63 |
256 | 571193.03 | 0.89 | 362650.60 | 1.58 |
512 | 604975.51 | 2.97 | 387072.57 | 3.96 |
1024 | 614351.07 | 4.33 | 401404.45 | 7.84 |
Read Only 性能
Threads | V4.0.0_CE QPS | V4.0.0_CE 95% Latency (ms) | V3.1.0_CE QPS | V3.1.0_CE 95% Latency (ms) |
---|---|---|---|---|
32 | 124009.84 | 5.47 | 105416.23 | 6.28 |
64 | 222034.29 | 5.88 | 138571.41 | 9.22 |
128 | 355395.57 | 7.04 | 205698.25 | 13.22 |
256 | 453947.58 | 12.30 | 253858.84 | 23.10 |
512 | 524999.55 | 20.74 | 286324.43 | 42.61 |
1024 | 510261.30 | 70.55 | 279067.64 | 123.28 |
Write Only 性能
Threads | V4.0.0_CE QPS | V4.0.0_CE 95% Latency (ms) | V3.1.0_CE QPS | V3.1.0_CE 95% Latency (ms) |
---|---|---|---|---|
32 | 37798.74 | 6.43 | 35737.28 | 7.04 |
64 | 72534.26 | 6.67 | 57660.74 | 9.56 |
128 | 125263.17 | 7.70 | 81073.80 | 14.73 |
256 | 188289.15 | 10.84 | 98663.59 | 25.74 |
512 | 239281.86 | 18.95 | 111863.72 | 44.98 |
1024 | 285313.68 | 34.95 | 119307.33 | 89.16 |
Read Write 性能
Threads | V4.0.0_CE QPS | V4.0.0_CE 95% Latency (ms) | V3.1.0_CE QPS | V3.1.0_CE 95% Latency (ms) |
---|---|---|---|---|
32 | 68305.00 | 11.65 | 64412.17 | 12.08 |
64 | 123581.29 | 12.98 | 89716.44 | 17.95 |
128 | 203527.24 | 16.71 | 106215.37 | 32.53 |
256 | 276437.90 | 25.74 | 114100.12 | 66.84 |
512 | 319334.46 | 48.34 | 157859.02 | 99.33 |
1024 | 314807.75 | 147.61 | 146540.16 | 225.98 |
测试方案:
通过 OBD 部署 OceanBase 集群,ODP 和 TPC-C 单独部署在一台机器上, 防止客户端的压力不足成为性能瓶颈。
3 节点的 OceanBase 集群部署规模为 1:1:1,部署成功后先新建跑 TPC-C 测试的租户及用户(sys 租户是管理集群的内置系统租户,请勿直接使用 sys 租户进行测试),设置租户的 Primary Zone 为 RANDOM。
租户规格:
MAX_CPU = 26
MEMORY_SIZE = 70g
软件版本:
mysql-connector-java-5.1.47
Benchmark SQL V5.0
测试配置:
warehouse = 1000
loadWorder=40
terminals=800
runMins=5
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4
测试结果:
指标 | V4.0.0_CE | V3.1.0_CE |
---|---|---|
tpmC (NewOrders) | 307021.0 | 295855.92 |
tpmTOTAL | 682517.67 | 657398.9 |
测试方案:
使用 OBD 部署 OceanBase 数据库集群。TPC-H 客户端需要部署在一台机器上, 作为客户端的压力机器。您无需部署 ODP,测试时直连任意一台机器即可。
3 节点的 OceanBase 集群部署规模为 1:1:1,部署成功后先新建跑 TPCH 测试的租户及用户(sys 租户是管理集群的内置系统租户,请勿直接使用 sys 租户进行测试),设置租户的 Primary Zone 为 RANDOM。
测试数据量:100GB。
租户规格:
MAX_CPU = 26
MEMORY_SIZE = 70g
测试结果(单位均为秒):
Query | V4.0.0_CE | V3.1.0_CE | 提升% |
---|---|---|---|
Q1 | 2.34 | 14.04 | 500.00% |
Q2 | 0.14 | 1.12 | 700.00% |
Q3 | 0.72 | 13.57 | 1784.72% |
Q4 | 0.56 | 2.51 | 348.21% |
Q5 | 2.25 | 12.31 | 447.11% |
Q6 | 0.23 | 7.33 | 3086.96% |
Q7 | 1.52 | 10.38 | 582.89% |
Q8 | 0.70 | 11.42 | 1531.43% |
Q9 | 5.22 | 30.99 | 493.68% |
Q10 | 1.24 | 6.84 | 451.61% |
Q11 | 0.23 | 1.22 | 430.43% |
Q12 | 1.62 | 8.64 | 433.33% |
Q13 | 2.41 | 7.59 | 214.94% |
Q14 | 0.36 | 1.51 | 319.44% |
Q15 | 0.79 | 3.01 | 281.01% |
Q16 | 0.66 | 2.66 | 303.03% |
Q17 | 0.63 | 8.60 | 1265.08% |
Q18 | 0.93 | 7.88 | 747.31% |
Q19 | 0.78 | 9.36 | 1100.00% |
Q20 | 1.17 | 10.95 | 835.90% |
Q21 | 2.42 | 12.27 | 407.02% |
Q22 | 1.24 | 4.05 | 226.61% |
Total | 28.16 | 188.25 | 568.50% |
功能 | 变更点说明 |
---|---|
备份能力 | 不再支持集群级备份,支持租户级备份 不支持二次备份功能数据校验能力、归档日志压缩和手工清理功能将在后续版本支持 |
时钟源 | 租户时钟源不再支持 LTS 模式 |
主备库 | 不再支持集群级主备库,后续版本将支持租户级主备库 |
Queuing 表 | 不再支持 |
加密投票型副本 | 不再支持 |
Partition Group | 不再支持 |
Table Group | 不再支持 binding=true 的 Table Group |
合并 | 不再支持集群级合并,支持租户级合并不再支持轮转合并,租户内所有 Zone 一起合并 |
RESOURCE UNIT | 参数设置变更,删除参数存储空间(MAX_DISK_SIZE)和 Session 个数(MAX_SESSION_NUM ),增加参数日志盘空间(LOG_DISK_SIZE)。删除参数 MAX_MEMORY/MIN_MEMORY,使用 MEMORY_SIZE 参数设置内存资源。必选参数为 MAX_CPU和MEMORY_SIZE,可选参数 MIN_CPU 默认值等于 MAX_CPU,LOG_DISK_SIZE 默认值为 MEMORY_SIZE * 3,MAX_IOPS、MIN_IOPS、IOPS_WEIGHT 默认值是根据租户 CPU 个数按比例分配。 |
Meta 租户 | 新增 Meta 租户,是 OceanBase 内部自管理的租户,每创建一个用户租户会创建一个对应的 Meta 租户,其生命期与用户租户保持一致。Meta 租户用于存储和管理用户租户的集群私有数据,这部分数据不需要跨库物理同步以及物理备份恢复,例如:配置项、位置信息、副本信息、日志流状态、备份恢复相关信息、合并信息等。 |
租户的 UNIT 资源配置 | 不再支持按 Zone 个性化配置租户的 Unit 个数,只能按照 Unit Group 维度整体调整,扩缩容时要求租户所有 Zone 的 Unit 个数相同 |
Primary Zone 和 Locality 配置 | 不再支持表级、DB 级、tablegroup 级配置 primary zone 和 locality,仅支持租户级别配置 primary zone 和 locality |
MySQL 模式下,语法 /*! xxx */;
|
版本命令全部执行,不支持的命令不进行报错处理 |
浮点类型 | 不再支持 float(m,d) 格式定义,仅支持 float(m) 和 float(m,0) 的格式定义 |
OceanBase V4.0 新增诸多自有视图,主要分为两大类:数据字典视图和动态性能视图。数据字典视图用于展示内部表这些实体表中存储的数据或数据的组合,用以替代之前直接对内部表的查询。动态性能视图用于展示系统运行过程中很多内存状态信息,用以替代之前直接对虚拟表的查询。举例如下:
DBA_OB_SERVERS 展示集群的服务器节点信息,当系统管理员使用 ADD SERVER
和 DELETE SERVER
运维命令增删机器后,这里查询的机器数量就会发生变化。该视图同时展示 RootService 是否在机器上(WITH_ROOTSERVER)、心跳是否正常(STATUS)、程序的版本号(BUILD_VERSION)等信息。
GV$OB_UNITS 展示每台服务器上具体有哪些租户的哪些 UNIT 的动态性能视图。该视图用于查询各个服务器上最新的 UNIT 信息,包含了 Meta 租户的 UNIT 和隐藏系统租户的 UNIT,Meta 租户 UNIT 是每个系统内部构造的。
OceanBase V4.0 数据库对实体表和虚拟表进行了重新梳理和设计。举例如下:
实体表 __all_tenant_partition_meta_table 记录 PG 内 partition 汇报的元信息,V4.0 不再支持 PG 故将该表删除。
实体表 __all_table_v2 记录 table 多版本 schema 信息,V4.0 将表名称变更为 __all_table。
虚拟表 __all_virtual_core_meta_table 展示系统租户 __all_core_table 表副本的位置信息,V4.0 去掉的关键字段 table_id、partition_id、partition_cnt,增加关键字段 ls_id。
有关视图的详细信息,参见 系统视图。
由于架构升级很多配置项已不再起作用,V4.0 对于无效的配置项进行了删减和变更。比如用于触发 Major freeze 的 minor_freeze_times 已经删除。还调整了一些配置项的默认值,因为从底层解决了大事务能力的支持,事务不再受冻结操作影响,所以 freeze_trigger_percentage 默认值调整为 20%。
配置项 | 用途及不兼容点说明 | 状态变化 |
---|---|---|
minor_warm_up_duration_time | 数据预热相关 | 废弃 |
minor_deferred_gc_time | 转储完成延迟回收 SSTable 的时间 | 废弃 |
_minor_deferred_gc_level | 转储完成延迟回收 SSTable 的级别 | 废弃 |
max_kept_major_version_number | 最多保存 major 版本数量 | 废弃 |
_enable_sparse_row | 是否开启稀疏行 | 废弃 |
minor_freeze_times | 两次 major 之间的 minor 次数 | 废弃 |
clog_usage_limit_size | 日志盘使用总空间,改由租户 unit config 设置 | 废弃 |
enable_separate_sys_clog | 系统表、用户表日志流分离存储 | 废弃 |
clog_max_unconfirmed_log_count | 滑动窗口长度 | 废弃 |
_ob_clog_disk_buffer_cnt | batch buffer 的数目 | 废弃 |
clog_cache_priority | clog cache 优先级 | 废弃 |
index_clog_cache_priority | ilog cache 优先级 | 废弃 |
_clog_aggregation_buffer_amount | 聚合提交所使用的 buffer 数目 | 废弃 |
_flush_clog_aggregation_buffer_timeout | 聚合提交 freeze 间隔 | 废弃 |
_enable_clog_rpc_aggregation | 是否对所有日志 RPC 开启聚合 | 废弃 |
system_cpu_quota | 500 租户 CPU 规格 | 废弃 |
flush_log_at_trx_commit | 对标 MySQL 同名配置项 | 废弃 |
election_cpu_quota | election 租户 CPU 规格 | 废弃 |
enable_election_group | 是否开启选举虚拟组 | 废弃 |
enable_log_archive | 是否开启日志归档 | 废弃 |
clog_disk_usage_limit_percentage | 日志盘使用空间占总磁盘空间的上限 | 废弃 |
clog_disk_utilization_threshold | 日志盘正常运行期间使用空间占总磁盘空间的百分比 | 废弃 |
minor_compact_trigger | 储触分层转储的阈值 | 语义变化,集群级配置项变更为租户级配置项 |
major_compact_trigger | 冻结后触发版本合并的阈值 | 语义变化,集群级配置项变更为租户级配置项 |
freeze_trigger_percentage | 转储或合并转储触发阈值 | 默认值由 70% 调整为 20% |
writing_throttling_trigger_percentage | memtable 写入限流触发阈值 | 默认值由 100% 调整为 60% |
writing_throttling_maximum_duration | memtable 写入限流时长 | 默认值由 1h 调整为 2h |
ob_trx_timeout | 事务超时时长 | 默认值 100s 调整为 1d |
ob_trx_idle_timeout | 空闲事务超时时长 | 默认值由 120s 调整为 1d |
不支持从 V3.x 版本在线升级到 V4.0 版本。
支持通过 OMS 将 V3.x 版本数据使用逻辑迁移升级到 V4.0 版本。
OceanBase 数据库 V4.0.0 推荐使用的配套工具版本如下:
组件 | 配套版本 |
---|---|
OCP 社区版 | V4.0.0 |
ODC 社区版 | V4.0.0 |
OceanBase Proxy(OBProxy) | V4.0.0 |
OceanBase JDBC | V2.4.0 |
MySQL JDBC | V5.1.47 |
OceanBase ODBC | V2.0.6 |
OceanBase Client(OBClient) | V2.2.0 |
OceanBase Deployer(OBD) | V1.6.0 |
OceanBase Agent(OBAgent) | V1.2.0 |
ob-operator | V1.1.0 |
OceanBase V4.0.0 暂时不支持副本扩容后的数据负载均衡,扩容前已经存在的数据无法均衡到新添加的节点上,计划在 V4.1 版本补齐负载均衡能力。
OceanBase V4.0.0 暂时不支持主备库模式部署的产品形态,计划在 V4.1 版本补齐主备库产品形态。
OceanBase V4.0.0 暂时不支持复制表,后续版本将补齐该能力。
OceanBase V4.0.0 支持从主集群发起数据备份,后续版本将支持从备集群发起数据备份。
OceanBase V4.0.0 节点在生产环境最低要求运行规格为 4C16GB,租户 CPU 资源建议 2C 及以上,租户内存资源建议 4GB 及以上。
OceanBase V4.0.0 当前仅支持 F 副本,其它类型副本如 R 副本将在后续版本补齐。
OceanBase V4.0.0 当前仅支持调大租户的 Unit 个数(UNIT_NUM),后续版本将支持调小租户的 Unit 个数。
Published by LINxiansheng almost 2 years ago
This version fixed one bug.
Fixed not hit plan cache due to equal constraint (39c3a048177154899edf1160e873979ea78dadd1)
本次发版主要是BUG修复。
修复等值约束下计划未命中的问题 (39c3a048177154899edf1160e873979ea78dadd1)
Published by LINxiansheng over 2 years ago
Items | Description |
---|---|
Release date | 2022-7-18 |
Release number | V3.1.4 |
Commit number | b4bfa011ceaef428782dcb65ae89190c40b78c2f |
To provide better services to community users, OceanBase Community Edition V3.1.4 optimizes the database to make it more user-friendly and stable based on the feedback on applications of the community project.
OceanBase Database is a distributed disk-resident database. It organizes and manages data in a logical architecture of macroblocks and microblocks. In terms of physical storage, OceanBase Database uses a ssblock file to store data on each OBServer. At present, the disk space is fully pre-allocated and occupied by the ssblock file on each OBServer. This allocation mode ensures the availability of disk resources during the operation of OceanBase Database. It avoids data persistence failures due to insufficient disk space, which reduces the system runtime risk.
This new version of OceanBase Database supports dynamic allocation of data files as needed. You need to configure only the datafile_next parameter that specifies the step size of automatic disk usage increase and the datafile_maxsize parameter that specifies the maximum disk space that can be automatically allocated.
OceanBase Database regulates disk space by using scheduled tasks based on the following rules:
OceanBase Community Edition V3.1.4 supports the collection and monitoring of statistics in the form of histograms. You can use OceanBase Database in combination with the histogram monitoring metrics of Prometheus. Specifically, you can define and generate a new statistics table that records statistical data of the specified percentiles, such as the 95th and 99th percentiles, in OceanBase Database. Then, the open source component OBAgent exports the statistics to and displays the statistics in Prometheus. This makes OceanBase Database easier to use. When this feature is enabled, the write performance can be somewhat affected.
Histogram statistics of OceanBase Database supports the following features:
OBKV is supported to clean up the expired historical data.
OceanBase Database maintains expired data on OBServers and supports the recycle of the expired data based on the timestamp and version respectively specified by the TIMESTAMP and MAXVERSION parameters. You can specify the expiration time and the maximum number of versions of table data in the comment for the column family table upon table creation. OceanBase Database runs periodic background tasks to launch partition-level transaction scanning and clean up the expired data at the Partition Service layer.
Key updates:
When an irrational SQL execution plan is found, the DBA can invalidate the plan based on the SQL ID. This avoids the invalidation of the entire plan cache, which can affect the system stability. Usage notes:
ALTER SYSTEM FLUSH PLAN CACHE [ [SQL_identifier] [db_list] tenant_list ][global];
.ALTER SYSTEM FLUSH PLAN CACHE [ [ SQL_identifier ] [db_list] ] [global];
.update [table_name] set [column_name]
statement fails due to the Data too long for column
error, the error message specifies the column that causes the error.set global lower_case_table_names;
statement or the alter tenant [tenant_name] set variables lower_case_table_names;
statement./*+ LEADING */
comment will fail with the Invalid argument
error.create table t select ~1;
syntax to create a table.show full columns
command are modified to improve the compatibility with MySQL databases.信息 | 描述 |
---|---|
发布时间 | 2022-7-18 |
版本号 | V3.1.4 |
提交号 | b4bfa011ceaef428782dcb65ae89190c40b78c2f |
在 V3.1.4 版本,OceanBase数据库针对社区项目应用反馈,优化提升内核易用性与稳定性,服务广大社区用户。
OceanBase数据库是一款分布式磁盘数据库,在系统逻辑架构上使用宏块(Macro Block)与微块(Micro Block)对数据进行组织管理,在物理存储上则使用ssblock文件进行数据存储。当前OceanBase的ssblock文件采用预先全额分配并占用的磁盘空间管理方式,该分配方式保障了OceanBase数据库在使用过程中的磁盘资源可获取性,可避免因磁盘空间不足导致数据持久化失败,减少系统运行时的风险。同时本次版本迭代OceanBase数据库新增支持数据文件动态按需分配, 用户只需要配置其关心的一次磁盘自动分配大小datafile_next和磁盘空间自动分配上限值datafile_maxsize即可。
OceanBase数据库主要采用定时任务的方式进行磁盘空间调整,核心能力如下:
新增支持直方图类型统计信息采集与监控。结合Prometheus的直方图类型(Histogram)监控指标,在OceanBase数据库内部定义和生成新的统计信息表,记录99、95等分位的统计数据,通过obagent开源组件输出到Prometheus进行展示,提升产品易用性。但需要注意的是,该功能启用时会带来少量写性能损耗。
OceanBase数据库的直方图类型统计信息提供如下能力:
新增支持多模数据库(OBKV)支持历史数据过期清理。OceanBase数据库采用服务端维护过期数据的方式,支持基于TIMESTAMP的时间过期回收和MAXVERSION版本过期的回收,用户可在 column family 表的 comment 中设置表数据的过期时间和多版本数量,OceanBase内部采用周期性后台任务, 在Partition Service层基于分区粒度开启事务扫描并清理过期数据。核心能力如下:
支持失效单条 SQL 的缓存计划,当 DBA 诊断出某条SQL 的执行计划不合理时,可以根据 SQL ID 做细粒度计划缓存的淘汰,避免失效整个Plan Cache影响系统性能稳定。使用方法如下:
lower_case_table_names变量是全局只读变量,因此我们禁止通过set global lower_case_table_names和alter tenant [tenant_name] set variables lower_case_table_names语法对该变量进行修改。
Published by LINxiansheng over 2 years ago
Published by LINxiansheng over 2 years ago
Please refert to https://open.oceanbase.com/blog/10900260 for more Details.
Item | Description |
---|---|
Release date | 2022-3-30 |
Release number | V3.1.3 |
Commit number | 3d79cacb37012cf61b7cb8faf00d9a6bb152bcd1 |
In V3.1.3, OceanBase Database enhanced its ecological capabilities to provide better services for community users.
In this version, OceanBase Database supports DDL, index creation, SQL query and data type conversion operations, and supports all the JSON functions of MySQL 5.7 and some of JSON functions of MySQL 8.0.
Applications can obtain API interfaces that are compatible with HBASE (HBASE 0.94) by using this client, and communicate with OceanBase Database via TABLE API interface protocol. Besides, in this version, OceanBase Database supports WideColumn data mode, optimizes the Filter logic, and supports KEY, RANGE and Prefix partitions.
In this version, OceanBase Database supports being connected via the following MySQL native drivers:
With ob-operator, OceanBase Database can be deployed on Kubernetes clusters on public cloud or on-premise environments. ob-operator can be deployed by using YAML files or Kustomize. ob-operator provides the following functions.
OceanBase Database and OBProxy are tested and verified on ARM platforms. In V3.1.3, users can develop, compile and test and deploy applications on ARM platforms.
In V3.1.3, OceanBase Database provides 2C8GB Docker images. Users can learn and use OceanBase Database with less resources.
Enhance the reliability of CDC data synchronization
Formerly, the data captured by CDC from OceanBase Database is stored in memory and then provided to downstream consumers, and this presents very high requirements on server specifications and might cause data synchronization failure on customers' key business. Therefore, OceanBase Database enhances the sychronization capability of CDC link.
更全版本信息, 请参考https://open.oceanbase.com/blog/10900260 .
名称 | 描述 |
---|---|
发布时间 | 2022-3-30 |
版本号 | V3.1.3 |
提交号 | 3d79cacb37012cf61b7cb8faf00d9a6bb152bcd1 |
在 V3.1.3 版本,OceanBase数据库进一步增强社区生态能力,更好地服务广大社区用户。
支持 JSON 格式数据类型
支持 DDL、索引创建、SQL 查询、数据类型转换等基本操作,兼容MySQL 5.7 版本的全量以及 8.0 版本的部分 JSON 函数。
应用可以通过该客户端获得HBASE语法兼容(HBASE 0.94版本)的API接口,与OceanBase数据库通过TABLE API 接口协议进行通信。在数据模型上增加宽表模型(WideColumn),优化 Filter 逻辑,支持 KEY 分区、RANGE 分区和前缀分区。
支持更多MySQL生态原生驱动连接OceanBase数据库:
通过使用 ob-operator,OceanBase 数据库可以以容器的形式运行在公有云或私有化部署的 Kubernetes 集群上。用户通过 YAML或Kustomize 部署 ob-operator,ob-operator 以服务的形式提供如下能力:
完成OceanBase 数据库与OBProxy中间件在ARM架构平台下的适配验证,并发布基于ARM架构的版本,社区用户可以在ARM平台下进行业务开发、编译测试和应用部署。
发布2C8GB资源规格的Docker镜像,方便社区开发者使用更小的资源学习和使用OceanBase数据库,降低入门成本。
CDC 从 OceanBase 数据库拉取的数据以内存态的形式提供给下游消费者,对机器资源配置规格有较高要求,对于用户的关键业务场景(例如大数据量入库场景),可能会造成数据同步失败。因此,我们对CDC链路的数据同步能力进行增强:
Published by LINxiansheng almost 3 years ago
Item | Description |
---|---|
Release date | 2021-12-30 |
Release number | V3.1.2 |
Commit number | d4ace121deae5b81d8f0b40afbc4c02705b7fc1d |
In V3.1.2, we provided free GUI developer tool (ODC), maintenance and monitoring tool (OCP), data migration tool (OMS), OBDUMPER, and OBLOADER for OceanBase users. OceanBase supported online cross-version upgrade. You can specify the target upgrade version by using OBD. OBD will automatically find the best upgrade solution and do the upgrade for you. The upgrade process does not affect your business. We optimized the update of hot row data and improved the performance by 300%. We optimized the delimination mechanism of SQL PLAN for partition tables. We optimized the underlying communication code. We added multiple SQL MODE functions and system functions.
Developer center (ODC): OceanBase Developer Center Community Version is a development platform for OceanBase database. ODC supports database objects visual management, intelligent syntax, session management, recycle bin management, data import or export, and resource and permission management. Key features of ODC are:
Maintenance and monitoring tool (OCP): OceanBase Cloud Platform (OCP) is a cluster management tool for OceanBase Database. With OCP, you can manage and operate your hosts, networks, software packages, and the full lifecycle for your clusters and tenants. With OCP, you can also decrease your IT O&M cost. Key features of OCP are:
OceanBase Migration Service (OMS): You can use the OceanBase Data Migration Tool (OMS) Community Edition to migrate data from heterogeneous databases to OceanBase databases. OMS supports online data migration and real-time synchronization of incremental data. All changes to OceanBase database are synchronized in real-time to the source database before migration. You can use the management console to create data migration projects, customize task configuration and monitor the OMS transfer components. Key features of OMS are:
OBLOADER/OBDUMPER: You can use OBLOADER or OBDUMPER to import or export data. To improve concurrent performance for OBLOADER or OBDUMPER, you can specify the concurrency number, the paging query records number, and the batch number based on your kernel load capacity. OBLOADER and OBDUMPE support exporting SQL by partition, specified conditions, single table, multi-table, full database, and customized queries. OBLOADER and OBDUMPE support data pre-processing, field mapping import. OBLOADER and OBDUMPE are compatible with SQL, CSV, CUT, etc.
Supported online rotating upgrade across versions: You can upgrade your OceanBase database with the obd cluster upgrade
command. OBD automatically identifies the upgrade path between matching versions and does a rotating upgrade for each Zone. For more information, see OBD document.
Optimized data hotspot row: To update hotspot data, OceanBase used lock for write and released row-level locks before filling logs. This increased the concurrent update performance from 3000TPS to 9000TPS and expanded the upper limit for hotspot data processing.
Optimized the elimination mechanism for partition table SQL PLAN: In distributed scenario plan evaluation, there is no accurate feedback on the number of rows in the remote node partition. And there is a risk of plan degradation. OceanBase uses the final SQL execution time feedback to negatively optimize the execution plan. When the average execution time of the sampled query exceeds twice the first execution time, the PLAN is targeted to be eliminated and a new SQL PLAN is generated to solve the bad performance caused by the degradation of the SQL PLAN.
Optimized the communication clock stability: OceanBase uses CPU clock (SYS_clock_gettime) to get the timeout time for its underlying communication framework. However, the upper SQL layer uses OS clock (get_timeofday) to record the timeout time. The difference between these two times may cause the upper business layer to reset the original error code for the bottom layer. With the timeout difference tolerance design, OceanBase reproduces the system error and improves the error locating efficiency.
Compatibility with MySQL: Supported some new system functions:
SELECT VALIDATE_PASSWORD_STRENGTH('Password@123');
。SELECTUUID_SHORT();
。SELECT TO_BASE64('12345'). FROM_BASE64() decodes base64 encoded string and return result. For example, SELECT FROM_BASE64('MTIZNDU=');
.SELECT DAY('2021-12-12');
.Open sourced OBKV TABLE JAVA Client: Provided direct access to the underlying OceanBase database stored table data through the TABLE API interface protocol. You can call this API as a JAR package in development. TABLE API supports authentication, add, delete, check, and append operations. For more information, see GitHub repo
Open sourced OBKV HBASE API: Based on the basic interface protocol provided by the TABLE API, we added the wide table model (WideColumn) for the data model, optimized the filter logic, supported KEY partitioning, RANGE partitioning, prefix partitioning, and TTL. Compatibility with HBase API client is coming soon.
Supported UOS platform operating system: OceanBase and obproxy are fully compatible with the mainstream X86 platform operating system. For more information, see OceanBase GitHub repo.
Enhanced administrator tool ob_admin: supported parsing and explicitly exporting block_file files, archive files, backup meta information, and data. The input command is ob_admin dumpsst/archive_tool/dump_backup
. For more information, see ob_admin document.
Enhanced OceanBase Community Edition documentation. Documentation includes architecture design principles, performance tuning, troubleshooting, daily maintenance guidance,etc.
名称 | 描述 |
---|---|
发布时间 | 2021-12-30 |
版本号 | V3.1.2 |
提交号 | d4ace121deae5b81d8f0b40afbc4c02705b7fc1d |
在 V3.1.2 版本,我们为 OceanBase 用户提供了免费的图形界面开发者工具(ODC)、运维监控云平台(OCP)、数据迁移工具(OMS)、导数工具(OBLOADER 和 OBDUMPER) 。OceanBase 支持在线跨版本轮转升级,通过 OBD 指定需要升级到的版本,自动完成最佳升级路径解析和应用升级,全过程无需人工干预且不影响业务运行。优化了热点行数据更新,性能提升了 300%。优化了分区表 SQL PLAN 淘汰机制。优化了底层通信代码等。新增了多个 SQL MODE 和系统函数。
开发者中心(ODC):OceanBase 社区版开发者中心(ODC)是为 OceanBase 数据库量身打造的开发平台。为数据库开发者提供了数据库对象的可视化管理、智能语法、会话管理、回收站管理、导入导出、资源和权限统一管理等多种能力。ODC 核心功能如下:
运维监控工具(OCP):OceanBase 社区版运维监控工具(OCP)是为 OceanBase 数据库量身打造的企业级数据库集群管理平台工具。您可以使用 OCP 管理和运维主机、网络、软件包等资源,管理集群和租户的全生命周期,降低 IT 运维成本。OCP 的核心功能如下:
数据迁移工具(OMS):您可以使用 OceanBase 社区版数据迁移工具(OMS)实现异构数据库与 OceanBase 数据库的数据迁移。OMS 支持将异构数据库在线不停服地迁移至 OceanBase 数据库,同时在应用切换至 OceanBase 数据库后,将 OceanBase 数据库上所有的变更数据实时同步至切换前的源端数据库。您可以使用管理控制台创建数据传输项目、自定义任务配置和监控运维传输组件。OMS 的核心功能如下:
数据导入导出工具(OBLOADER/OBDUMPER):您可以使用 OBLOADER 和 OBDUMPER 快速导入和导出数据。您可以根据内核的负载能力指定并发数、分页查询的记录条数及分批处理数来提升导入和导出的并发性能。OBLOADER 和 OBDUMPER 支持按照分区、指定条件、单表、多表、全库、以及自定义查询 SQL 导出,支持数据预处理、字段映射导入,兼容 SQL,CSV、 CUT 等多种文本格式。
支持在线跨版本轮转升级:您可以通过 obd cluster upgrade
命令升级 OceanBase 数据库。OBD 自动识别匹配版本间的升级路径,对每个 Zone 进行轮转升级。更多信息,参考 OBD 使用指导。
数据热点行优化:在热点数据更新场景中,OceanBase 通过对 lock for write 加锁逻辑、填充日志前释放行级锁优化,使得 OceanBase 在处理热点数据的并发更新性能从 3000TPS 提升到 9000TPS,提升了热点数据处理能力上限。
优化了分区表 SQL PLAN 的淘汰机制:在分布式场景计划评估中,无法准确获得远端节点分区的行数反馈,存在计划退化的风险。OceanBase 采用最终 SQL 执行时间反馈负向优化执行计划,当采样的查询平均执行时间超过首次执行时间的 2 倍时,则针对性淘汰该 PLAN 并重新生成新的 SQL PLAN,解决因 SQL PLAN 劣化导致的性能下降问题。
通信时钟稳定性优化:OceanBase 底层通信框架使用 CPU 时钟(SYS_clock_gettime)获取超时时间,而上层 SQL 业务逻辑是使用操作系统时钟(get_timeofday)记录超时时间的,这两种时间精度上的误差会有极低概率导致上层业务逻辑重置底层的原始错误码,OceanBase 通过设计可容忍超时误差计算逻辑,准确还原出系统运行报错的第一现场,提升问题分析诊断效率。
MySQL兼容:新增支持系统函数:
SELECT VALIDATE_PASSWORD_STRENGTH('Password@123');
。SELECTUUID_SHORT();
。SELECT TO_BASE64('12345') 和 SELECT FROM_BASE64('MTIZNDU=');
。SELECT DAY('2021-12-12');
。开源 OBKV TABLE JAVA Client:提供通过 TABLE API 接口协议直接访问 OceanBase 数据库底层存储表数据的操作方式,用户开发程序可以以 JAR 包的形式调用该接口,支持认证、对行增删改查追加等操作。详见GitHub代码仓库(https://github.com/oceanbase/obkv-table-client-java)
开源 OBKV HBASE API:基于 TABLE API 提供的基本接口协议,在数据模型上增加宽表模型(WideColumn),优化 filter 逻辑,支持 KEY 分区、RANGE 分区和前缀分区,支持 TTL。兼容 HBase API 客户端持续开源中。
新增配置支持统信 UOS 平台操作系统:observer 与 obproxy 全面兼容主流 X86 平台操作系统。兼容列表详见:https://github.com/oceanbase/oceanbase
增强管理员工具 ob_admin:支持解析和显式输出 block_file 文件、归档文件、备份元信息和数据。命令输入形式为ob_admin dumpsst/archive_tool/dump_backup,详细参考帮助命令。
完善 OceanBase 社区版本文档。文档包括架构设计原理、性能调优、故障处理、日常维护指导等。
Published by MizuhaHimuraki almost 3 years ago
Published by MizuhaHimuraki about 3 years ago
In V3.1.1, we have strengthened OceanBase in these fields: kernel compatibility, tools, interfaces, backup and recovery, open-source OS, usability. We will continue to enhance the open-source productization capabilities. Core enhancements and improvements are as follows.
CRC32()
. You can calculate the cyclic redundancy check value of a given string. For example, SELECT CRC32("abc");
. For information, see PR 152.CONVERT_TZ()
. This function converts a datetime value dt from the time zone given by from_tz to the time zone given by to_tz and returns the resulting value. For example,SELECT CONVERT_TZ('2021-01-01 12:00:00','+00:00','+08:00');
. For information, see PR 276.INET_ATON()
, INET_NTOA()
, INET6_ATON()
, INET6_NTOA()
, IS_IPV4()
, IS_IPV6()
, IS_IPV4_MAPPED()
, and IS_IPV6_MAPPED()
. For information, see PR 198.MAX_CONNECTIONS
to set the maximum connection for tenants. Use the system variable MAX_USER_CONNECTIONS
to set the maximum connection for users. When you create a user, use MAX_USER_CONNECTIONS
to set the maximum concurrent connection for a specified user. MAX_CONNECTIONS_PER_HOUR
specifies the maximum connection per hour for a user.obd cluster autodeploy
to auto deploy OceanBase Database with your maximum available resource. Use obd cluster tenant create/drop
to create or drop a tenant. For more information, see OBD cluster tenant create.ob_admin clog_tool/usec_tools <args>
. For more information, seeclog_tool.Parameter name | Original default value | Modification type | New default value | Description |
---|---|---|---|---|
minor_freeze_times | 5 | Modification | 100 | Avoid triggering frequent merges |
freeze_trigger_percentage | 70 | Modification | 30 | Reduce the risk of excessive cluster memory consumption. Decreasing this value dumps earlier to release memory, but dumping becomes more frequent. |
enable_merge_by_turn | TRUE | Modification | FALSE | By default, we recommend that you merge multiple zones at the same time. Merging by turn needs different zones to avoid response time increase during merges. |
trace_log_slow_query_watermark | 100ms | Modification | 1s | The original default value 100ms is not reasonable. The performance decreases in high pressure. |
clog_sync_time_warn_threshold | 100ms | Modification | 1s | The original default value 100ms is not reasonable. The performance decreases in high pressure because too many log files are produced. |
enable_one_phase_commit | TRUE | Modification | FALSE | Deprecated in the new version. |
enable_pg | FALSE | Deletion | -- | Deprecated in the new version. |
_enable_split_partition | FALSE | Deletion | -- | Deprecated in the new version. |
本次迭代版本(v3.1.1),OceanBase 全面提升内核兼容、工具生态、接口开放、备份恢复、开源 OS 支持和易用性能力,持续增强开源产品化应用能力。您可以获得以下关键特性:
Common Table Expressions
),丰富了 SQL 的能力,满足复杂业务查询需求实现。CRC32()
),完善 MySQL 数据迁移到 OceanBase 的数据校验环节。ob_admin
和 ERROR CODE 解释工具 ob_error
,提升问题排查分析和故障应急处理能力。MySQL兼容:
Common Table Expressions
)。语法兼容 MySQL 8.0,支持非递归 CTE 和递归 CTE。CTE 相当于一个临时表但没有实际存储,仅在查询执行期间被使用,丰富了 SQL 的功能。详细信息,参考 PR 314。CRC32()
。您可以通过计算字符串的 CRC32
校验和来校验数据。例如 SELECT CRC32("abc");
。详细信息,参考 PR 152。CONVERT_TZ()
。此函数可以实现时区转换查询。例如 SELECT CONVERT_TZ('2021-01-01 12:00:00','+00:00','+08:00');
。详细信息,参考 PR 276。INET_ATON()
、INET_NTOA()
、INET6_ATON()
、INET6_NTOA()
、IS_IPV4()
、IS_IPV6()
、IS_IPV4_MAPPED()
和 IS_IPV6_MAPPED()
。详细信息,参考 PR 198。MAX_CONNECTIONS
设置租户最大连接数。系统变量 MAX_USER_CONNECTIONS
设置用户最大并发连接数。创建用户时,可以通过参数 MAX_USER_CONNECTIONS
指定用户的最大并发连接数。参数 MAX_CONNECTIONS_PER_HOUR
指定用户的每小时最大连接数。高可用性:
易用性:
obd cluster autodeploy
命令,支持自动使用最高规格启动 OceanBase 数据库。新增 obd cluster tenant create/drop
命令支持创建/删除租户。详细信息,参考 OBD 创建租户。mysql_test
、TPCH
和 Sysbench
测试框架。详细参考帮助命令。详细信息,参考 OBD 测试命令。ob_error
。ob_error
可以帮助您根据 OceanBase 数据库返回的错误码快速找到帮助信息,输入形式为 ob_error [option] errorcode
。详细信息,参考 错误码工具。ob_admin
。ob_admin 支持解析事务日志和转换事务 ID ,提升疑难问题分析诊断能力。输入形式为ob_admin clog_tool/usec_tools <args>
。详细信息,参考 clog_tool。接口开放:
execute()
执行单行操作和 batch_execute()
执行多行批量操作。支持 retrieve/get
、insert_or_update/put
、delete
、insert
、update
、replace
、increment
和 append
操作。配置项 | 原默认值 | 修改类型 | 新默认值 | 描述 |
---|---|---|---|---|
minor_freeze_times | 5 | 修改 | 100 | 增加内存转储次数,避免内存合并被触发,提升大批量写时性能稳定性 |
freeze_trigger_percentage | 70 | 修改 | 50 | 降低内存转储触发阈值,增加内存转储频率,避免内存写不足报错 |
enable_merge_by_turn | TRUE | 修改 | FALSE | 关闭按 ZONE 逐个合并机制,避免不必要的主备切换带给业务的影响 |
trace_log_slow_query_watermark | 100ms | 修改 | 1s | 增加慢查询 SQL 的时间阈值,减少慢查询日志,降低对磁盘的 IO 影响 |
clog_sync_time_warn_threshold | 100ms | 修改 | 1s | 增加 clog 同步告警时间阈值,减少同步日志 |
enable_one_phase_commit | TRUE | 修改 | FALSE | 新版本已废弃使用 |
enable_pg | FALSE | 删除 | -- | 已废弃的功能 |
_enable_split_partition | FALSE | 删除 | -- | 已废弃的功能 |
Published by MizuhaHimuraki about 3 years ago
Published by MizuhaHimuraki over 3 years ago