Oceanbase Versions Save

OceanBase is an enterprise distributed relational database with high availability, high performance, horizontal scalability, and compatibility with SQL standards.

v4.2.1_CE_BP2_HF1

5 months ago

Version information

Information Description
Release date December 18, 2023
Version V4.2.1_CE_BP2_HF1
Commit number f675233
OBServer RPM version oceanbase-ce-4.2.1.2-102010022023121415

Overview

  • This version addressed several customer and internal testing issues to enhance product stability.

  • Starting from V4.2.1_CE_BP2_HF1, batch rescan is disabled by default for the NESTED-LOOP JOIN (NLJ) and SUBPLAN FILTER (SPF) operators during cluster creation. However, for clusters upgraded from earlier versions to this version, batch rescan is enabled by default. If stability issues are found in batch rescan for the NLJ or SPF operator in an environment with large amounts data, you can disable batch rescan for the operator in the entire cluster by executing the SET GLOBAL _nlj_batching_enabled = false; statement. If the performance is not as expected after batch rescan is disabled, you can evaluate whether to enable batch rescan again based on the actual situation.

Bug fixes

版本信息

项目 描述
发布日期 2023-12-18
版本号 V4.2.1_CE_BP2_HF1
Commit 号 f675233
OBServer RPM 版本号 oceanbase-ce-4.2.1.2-102010022023121415

发版目的

  • 解决客户及内部测试遇到的问题,提升版本稳定性。

  • 从V4.2.1_CE_BP2_HF1 版本开始,新建集群时,Nested Loop join(NLJ)和 SUBPLAN FILTER(SPF)算子的 BATCH RESCAN 优化默认会被关闭。然而,对于从老版本升级上来的集群,它们会默认保持原来的 BATCH RESCAN 打开的状态。对于存量的环境,如果发现 NLJ/SPF BATCH RESCAN 的稳定性问题,可以通过执行 SET GLOBAL _nlj_batching_enabled = false; 命令来关闭该优化,这将在整个集群范围内禁用 NLJ/SPF 的 BATCH RESCAN 优化。如果在关闭优化后性能不符合预期,可以根据具体情况重新评估并选择是否重新开启。

缺陷修复

v4.2.1_CE_BP2

5 months ago

Version information

Information Description
Release date December 7, 2023
Version V4.2.1_CE_BP2
Commit number ccdde7d3
OBServer RPM version oceanbase-ce-4.2.1.2-102000042023120514

Enhanced features

  • The MySQL mode of OceanBase Database now supports paging queries while maintaining the same sorting method for each query.
  • A new command TRANSFER PARTITION is provided to manually adjust the distribution of partitions. With this command, you can migrate specific partitions to specific log streams to aggregate or scatter partitions.
  • OBKV now supports data compression for remote procedure calls (RPCs), reducing network bandwidth usage and user costs.
  • This version now allows you to set a threshold for switching the storage method of LOB data from INROW (stored in the primary table by using row storage) to OUTROW (stored in a separate LOB auxiliary table). This enhancement aims to improve the performance of LOB data queries.

Product behavioral changes

  • The backup_data_file_size parameter, which is related to backup and restore, is changed from a cluster-level parameter to a tenant-level parameter.

  • The tableapi_transport_compress_func parameter, which is related to TableAPI, is renamed as kv_transport_compress_func.

  • A new parameter kv_transport_compress_threshold is introduced to specify the minimum threshold for compressing OBKV query result sets.

  • The value range for adaptive adjustment of the server_cpu_quota_min and server_cpu_quota_max parameters is increased to meet requirements of larger specifications.

    cpu_count (0C, 8C) [8C, 16C) [16C, 32C) [32C, +∞)
    server_cpu_quota_min 1C 2C 3C 4C
    server_cpu_quota_max 1C 2C 3C 4C

Bug fixes

Considerations

  • Before V4.2.1_CE_BP2, there was a problem with the limitation of PX threads, potentially resulting in high CPU load on OBServer nodes. However, this issue has been resolved in V4.2.1_CE_BP2, and an upgrade is recommended.

  • In the current version, there are some instability issues when using the INSERT INTO SELECT statement for bypass import, particularly when triggering a data transfer. Therefore, it is not recommended to use the INSERT INTO SELECT statement for bypass import.

版本信息

项目 描述
发布日期 2023-12-07
版本号 V4.2.1_CE_BP2
Commit 号 ccdde7d3
OBServer RPM 版本号 oceanbase-ce-4.2.1.2-102000042023120514

特性增强

  • MySQL Mode 支持分页查询保序。
  • 新增 TRANSFER PARTITION 命令用于手动调整分区分布的能力。通过该命令,用户可以选择将特定的分区迁移到特定的日志流上,从而实现不同分区的聚合或打散分布。
  • OBKV 支持 RPC 数据压缩,减小网络带宽占用,降低用户成本。
  • 支持设置 LOB 数据存储方式由 INROW (和主表行存储在一起)转换为 OUTROW(将 LOB 数据存储在 LOB 辅助表中)的阈值,优化了大对象场景下的性能。

产品行为变更

  • 备份恢复相关配置项 backup_data_file_size 由集群级调整为租户级。

  • tableAPI 相关配置项 tableapi_transport_compress_func 更名为 kv_transport_compress_func

  • 新增配置项 kv_transport_compress_threshold 用于指定需要进行压缩的 OBKV 查询结果集大小的最小阈值。

  • 配置项 server_cpu_quota_minserver_cpu_quota_max 增大自适应变更的范围,以满足更大规格的需求。

    cpu_count (0c, 8c) [8c, 16c) [16c, 32c) [32c, +∞)
    server_cpu_quota_min 1c 2c 3c 4c
    server_cpu_quota_max 1c 2c 3c 4c

缺陷修复

注意事项

  • V4.2.1_CE_BP2 之前版本,存在 PX 线程限制失效问题,可能会导致 OBServer 的 CPU 负载过高,该问题在 V4.2.1_CE_BP2 已修复,并推荐进行升级。
  • 当前版本使用 INSERT INTO SELECT 语句旁路导入数据时,如果触发 Transfer,会存在一些不稳定的问题,因此不推荐通过此方法进行旁路导入。

v4.2.1_CE_BP1_HF1

6 months ago

Version information

Information Description
Release date November 13, 2023
Version V4.2.1_CE_BP1_HF1
Commit number 2f6924c
OBServer RPM version oceanbase-ce-4.2.1.1-101010012023111012

Overview

This version addressed several customer and internal testing issues to enhance product stability.

Bug fixes and improvements

版本信息

项目 描述
发布日期 2023-11-13
版本号 V4.2.1_CE_BP1_HF1
Commit 号 2f6924c
OBServer RPM 版本号 oceanbase-ce-4.2.1.1-101010012023111012

发版目的

解决客户及内部测试遇到的问题,提升版本稳定性。

缺陷修复

v4.2.1_CE_BP1

6 months ago

Version information

Information Description
Release date November 1, 2023
Version V4.2.1_CE_BP1
Commit number 7cb0fb4
OBServer RPM version oceanbase-ce-4.2.1.1-101000062023110109

Overview

  • This version improved the compatibility of user-defined variables with MySQL Database.

  • This version added two views GV$OB_KV_CONNECTIONS and V$OB_KV_CONNECTIONS to query all active connections of the current tenant in an OBKV database.

  • The maximum length of the system variable ob_tcp_invited_nodes was changed to 64 KB.

  • The default value of the ls_gc_delay_time parameter was changed to 0.

  • This version addressed several customer and internal testing issues to enhance product stability.

Bug fixes

版本信息

项目 描述
发布日期 2023-11-01
版本号 V4.2.1_CE_BP1
Commit 号 7cb0fb4
OBServer RPM 版本号 oceanbase-ce-4.2.1.1-101000062023110109

发版目的

  • 提升用户自定义变量与 MySQL 数据库的兼容性。
  • OBKV 新增视图 GV$OB_KV_CONNECTIONSV$OB_KV_CONNECTIONS 用于查看本租户所有的 KV 活跃连接。
  • 系统变量 ob_tcp_invited_nodes 长度限制调整为 64K。
  • 配置项 ls_gc_delay_time 默认值调整为 0。
  • 解决客户及内部测试遇到的问题,提升版本稳定性。

缺陷修复

v4.2.1_CE

7 months ago

Version information

Information Description
Release date October 13, 2023
Version V4.2.1_CE
Commit number 7b0f436
OBServer RPM version oceanbase-ce-4.2.1.0-100000102023092807

Overview

OceanBase Database V4.2.1_CE is the first Long-Term Support (LTS) version of the V4.2.x_CE series. This version comes with a range of MySQL-compatible features, such as the VALUES statement and JSON_TABLE expression. It also introduced the Workload Repository (WR)-based data collection framework and enhanced end-to-end diagnostic capabilities for commercialization. In addition, this version optimized system resource utilization and supports table-level restore and Tencent Cloud Object Storage (COS). This version is recommended in production environments for regular business operations.

Key features

Compatibility with MySQL

  • VALUES statement

    The VALUES statement was introduced in MySQL 8.0.19. It can be used to quickly construct a table of data or as a standalone DML statement with support for ORDER BY and Limit clauses. It can also be used as a special table in regular DML statements. OceanBase Database V4.2.1_CE is compatible with MySQL Database and supports the VALUES statement, making table value construction more convenient and easy to use.

  • RENAME COLUMN

    The RENAME COLUMN syntax was supported since MySQL 8.0. It allows users to rename columns without changing their definitions, which is more lightweight than the CHANGE COLUMN syntax. OceanBase Database is compatible with the RENAME COLUMN syntax of MySQL 8.0 since V4.2.1_CE.

OBKV features

  • JSON_TABLE expression

    JSON is a semi-structured data format where users can extract specific values from the JSON strings based on a path. The JSON_TABLE expression allows users to convert semi-structured data into structured data. The earlier versions of OceanBase Database already supported the JSON data type, but the JSON_TABLE expression was not implemented under the MySQL mode. To meet the needs of users who want to convert JSON data into structured data for computations, V4.2.1_CE also supports this expression under the MySQL mode.

  • OBKV TTL

    Time-to-live (TTL) is a commonly used feature in NoSQL databases, designed to automatically expire data. For example, in businesses that deal with historical data, there is a need to periodically scan the data, determine its expiration time, and delete it accordingly. Many businesses currently rely on the TableAPI of OBKV. To simplify the management of periodic data, OceanBase Database provided the OBKV TTL capability since V4.2.1_CE. Users can define TTL attributes at the table or row level using the CREATE TABLE statement so that expired data is not processed during read and write operations in OBKV.

Performance improvements

  • Concurrent execution of CREATE TABLE

    In the earlier versions of OceanBase Database, DDL requests were executed serially in RootService queues. Starting from OceanBase Database V4.1.0_CE, the concurrent DDL capability was introduced, with support for concurrent execution of TRUNCATE TABLE. To address the performance issues related to migrating millions of table structures, V4.2.1_CE now supports concurrent execution of CREATE TABLE, providing a performance improvement of tenfold or even more compared with serial execution.

  • Improved foreign key check performance

    Prior to OceanBase Database V4.2.1_CE, foreign key checks were implemented using nested SQL statements, incurring significant overhead. From V4.2.1_CE, foreign key checks are performed using Database Autonomy Service (DAS) tasks, and batch checks in single-table DML operations is supported. Additionally, with the check result caching strategy, noticeable performance improvements have been achieved in INSERT and UPDATE scenarios. In a single-node scenario (where the parent table and child table are on the same node), the performance degradation caused by foreign key checks during INSERT and UPDATE operations on foreign key tables is generally controlled to around 10% compared with tables without foreign keys. In a distributed scenario (where the parent table and child table are on different nodes), the performance degradation is generally controlled to around 30% compared with tables without foreign keys during INSERT and UPDATE operations.

  • Dynamic sampling on MemTables

    OceanBase Database V4.2.0_CE introduced the dynamic sampling feature, which samples data during the generation of an execution plan. When the number of rows in the SSTable exceeds that in the MemTable, dynamic sampling is performed on SSTable blocks. When the number of rows in the MemTable exceeds that in the SSTable, dynamic sampling is performed on the MemTable. In V4.2.0_CE, this was achieved through full read of the MemTable, which was relatively inefficient. However, in V4.2.1_CE, direct sampling for the MemTable is implemented, utilizing RANGE partitioning to perform interval reads. This enhancement significantly improves the efficiency of dynamic sampling on the MemTable.

  • Parallel read of archived logs

    In OceanBase Database V4.1.0_CE, OceanBase Change Data Capture (CDC) can consume archived logs through the CDC service or directly consume logs from the archive destination. In V4.2.0_CE, a network-based standby database reuses the log pulling framework of OceanBase CDC to pull logs from the primary database by using the CDC service. After the CDC service receives a log pulling remote procedure call (RPC) request from OceanBase CDC or a network-based standby database, the service first attempts to read logs from the local disk. If the corresponding logs do not exist in the local disk due to reasons such as log stream garbage collection (GC) or log recycling, and if the tenant has enabled log archiving, the CDC service reads logs from the log archive destination, such as the network file system (NFS) or Alibaba Cloud Object Storage Service (OSS). The log reading performance of the CDC service determines the log consumption speed at the downstream. If the performance of the CDC service in reading archived logs from OSS is poor, the synchronization link or the network-based standby database may lag behind the primary database and may be unable to become synchronized with the primary database. To address this issue, V4.2.1_CE allows the CDC service to consume OSS-archived log files based on the basic capability of parallel consumption of OSS files.

Resource optimization

This version optimized the utilization of system resources in public cloud environments, including user tenant memory, memory of the SYS500 tenant, and operating system memory. For example, for Elastic Compute Service (ECS) instances with specifications of 128 GB or higher, the memory utilization of system resources has been reduced from around 30% to approximately 15%.

High availability enhancement

  • Table-level restore

    Prior to OceanBase Database V4.2.1_CE, tenant-level data restore was supported. If data within a table was damaged due to a misoperation, users needed to rely on the physical restore feature to restore the tenant to a previous point in time or use the import/export feature for table-level restore. V4.2.1_CE added support for table-level restore, allowing users to specify which backup data to use, which databases or tables to restore, which tenant to operate on, and the desired recovery point in time on the target cluster.

  • Support for COS

    OceanBase Database V4.1.0_CE supports OSS as the backup media. OceanBase Database V4.2.1_CE supplements this support by allowing users to back up logs and data to COS and read backup data from COS for data restore.

Security enhancement

Data integrity protection: The Security Assessment of Commercial Cryptography Application imposes requirements for confidentiality and integrity protection on stored data in information systems. In the versions earlier than V4.2.1_CE, the transparent encryption feature of OceanBase Database has already supported AES_ECD and SM4_CBC (which are named in the format of encryption algorithm_encryption mode), providing confidentiality protection for stored data. V4.2.1_CE added support for the GCM mode. In addition to data encryption, the checksum of ciphertext is calculated based on the key, and the ciphertext is checked during decryption to determine whether the ciphertext has been changed, thereby protecting data integrity.

Diagnostic capabilities improvement

  • WR-based data collection framework

    The ease of use of the database performance diagnostics feature is closely related to the efficiency of system tuning. Oracle Database 10g introduces proactive automatic diagnostic capabilities such as Active Session History (ASH), Automatic Workload Repository (AWR), and Automatic Database Diagnostic Monitor (ADDM), and provides an inside-out (with information collected by internal components) and top-down (based on the database time and other metrics) database optimization and analysis framework. After decades of development, these capabilities have become industry benchmarks. OceanBase Database V4.2.1_CE implements a data collection framework similar to AWR of Oracle Database. The framework collects existing data such as ASH reports, statistics, wait events, and SQL execution details, and periodically persists performance-related views of OceanBase Database. OceanBase Database V4.2.1_CE introduces WR views and supports configuration adjustment and snapshot management by using DBMS_WORKLOAD_REPOSITORY packages. The new version also unifies, streamlines, enriches, and enhances SYSSTAT, ASH, and other statistical metrics for higher comprehensiveness and accuracy. The performance diagnostic capabilities will be further enhanced in future OceanBase Database versions.

  • Enhanced ASH feature

    The ASH feature was introduced in OceanBase Database V4.0.0_CE. It samples the status of all active sessions in the system at an interval of 1 second and records the information in internal tables. In OceanBase Database V4.2.1_CE, additional sampling points related to transactions, storage, and DAS were added. The ASH data is collected into the WR internal table at a default sampling rate of 10:1 and a collection interval of 1 hour. By analyzing ASH data, you can easily identify issues such as long wait events, slow SQL statements, and resource utilization of active sessions, which helps in performance optimization.

  • End-to-end diagnostics feature

    OceanBase Database V4.2.0_CE supports visualized end-to-end tracing of SQL requests, and in V4.2.1_CE, the configuration management capability for end-to-end diagnosis is further enhanced. A new view GV$OB_FLT_TRACE_CONFIG is added to record the configuration policies for end-to-end diagnostics at different levels. The GV$OB_PROCESSLIST view now includes LEVEL, SAMPLE_PERCENTAGE, and RECORD_POLICY columns to display the monitoring level, sampling frequency, and recording/printing policy that are effective for each session. Additionally, the GV$OB_SQL_AUDIT view includes a new column FLT_TRACE_ID to record the end-to-end trace information, enabling comprehensive SQL tracing. OceanBase Cloud Platform (OCP) will also provide corresponding page functionality to support this feature.

Product behavioral changes

The following table describes the product behavioral changes made in this version.

Feature Change description
Triggers disabled for the LOAD DATA statement The LOAD DATA statement is executed in parallel for fast data import. When parallel execution involves triggers, trigger correctness issues may occur. Therefore, triggers are disabled for the LOAD DATA statement in OceanBase Database V4.2.1_CE.
Semantic change for tenant=all
  • In the versions earlier than OceanBase Database V4.2.1_CE, the semantics of tenant=all was ambiguous. For example, tenant=all indicates all tenants in system parameter settings, but indicates user tenants in backup and restore settings.
  • Since OceanBase Database V4.2.1_CE, the semantics of tenant=all is changed and specifies "to include only all user tenants and to exclude SYS and META tenants". tenant=all_user and tenant=all_meta are added, which respectively indicate all user tenants and all META tenants. After the change, tenant=all and tenant=all_user share the exact same semantics. Therefore, tenant=all will be deprecated in future versions.
Refined load balancing control
  • OceanBase Database V4.2.0_CE introduced the load balancing and transfer capabilities, which are specified by the tenant-level parameter enable_rebalance. However, when the enable_rebalance parameter is disabled, you cannot modify unit_num, primary_zone, and other parameters in O&M commands.
  • OceanBase Database V4.2.1_CE introduced the tenant-level parameter enable_transfer, which allows you to disable the transfer feature for a tenant. You can use it with the enable_rebalance parameter to control the load balancing strategy for a tenant.
    • enable_rebalance=true and enable_transfer=true: specify to dynamically adjust the number of log streams for a tenant based on the load balancing algorithm and automatically perform leader balancing and partition balancing for the tenant.
    • enable_rebalance=true and enable_transfer=false: specify not to dynamically adjust the number of log streams or perform transfer but only to perform log stream balancing based on existing log streams.
    • enable_rebalance=false and enable_transfer: invalid. In this case, no load balancing related O&M commands are allowed.
Case sensitivity in OceanBase CDC OceanBase CDC is case insensitive in the versions earlier than V4.2.1_CE. The new version supports case sensitivity. The database and table names are output according to the setting of the lower_case_table_names parameter, whose valid values are 0, 1, and 2.
Transport Layer Security (TLS) protocol version for SSL encryption In the versions earlier than V4.2.1_CE, there were no restrictions on the TLS protocol version for SSL encryption. Therefore, clients can use the TLS protocol of an early version for encrypted communication with databases. However, some scenarios require TLS1.2 and TLS1.3 for higher security. For compatibility with clients of earlier versions, OceanBase Database V4.2.1_CE introduces the sql_protocol_min_tls_version parameter, which allows you to specify the minimum version of the TLS protocol. The default value is compatible with previous versions.
Calling a stored procedure with an output parameter without returning a result set MySQL allows you to call a stored procedure with an output parameter without returning the result set of the output parameter.
  • In the versions earlier than OceanBase Database V4.2.1_CE, a result set of an output parameter is returned, causing the native MySQL driver to report an error.
  • In OceanBase Database V4.2.1_CE, after you execute a CALL statement by using OBClient, the result set of the output parameter is no longer displayed.
zlib compression disabled In OceanBase Database V4.2.1_CE, you cannot use zlib compression for new tables or change the compression algorithm of an existing table to zlib.

View changes

The following table describes the changes to views made in this version.

View Change type Description
CDB/DBA_WR_CONTROL New Stores WR-related configurations.
[G]V$OB_TENANT_RUNTIME_INFO New Displays the running details of tenants.
[G]V$OB_SQL_AUDIT Modified The FLT_TRACE_ID column is added to record end-to-end trace information.

Parameter changes

The following table describes the parameter changes made in this version.

Parameter Change type Description
memory_limit_percentage Modified The upper limit of the percentage of available memory for OBServer nodes is changed from 90% to 95%. OBServer nodes are allowed to use a higher percentage of resources in servers with high specifications.
sql_protocol_min_tls_version New The minimum version of the SSL/TLS protocol used by SSL connections for SQL statements. This is a cluster-level parameter. The default value is none, which means there are no restrictions on the TLS version for connections.

Note

This parameter controls only the version number of SSL. To enable SSL, you must set the ssl_client_authentication parameter.

enable_transfer New Specifies whether to allow transfer within the tenant. This is a tenant-level parameter. This parameter is invalid when enable_rebalance is disabled. The default value is True, which indicates that transfer within the tenant is allowed.
compaction_dag_cnt_limit New The maximum number of directed acyclic graphs (DAGs) in a compaction DAG queue. This parameter is a tenant-level parameter. The default value is 15000. In scenarios with millions of partitions, you can increase the value of this parameter to speed up compaction, which however increases memory consumption.
compaction_schedule_tablet_batch_cnt New The maximum number of partitions that can be scheduled in each batch for batch compaction scheduling. This parameter is a tenant-level parameter. The default value is 50000. In scenarios with millions of partitions, you can increase the value of this parameter to speed up compaction, which however increases CPU consumption and results in longer thread scheduling time.
server_cpu_quota_min Modified The default value is changed from 1 to 0, and the value range is changed to [0, 16]. The value 0 indicates that the specifications of the sys tenant are adaptive.
server_cpu_quota_max Modified The default value is changed from 1 to 0, and the value range is changed to [0, 16]. The value 0 indicates that the specifications of the sys tenant are adaptive.

The recommended platform tool versions for OceanBase Database V4.2.1_CE are described in the following table:

Tool Version
OceanBase Database Proxy (ODP) V4.2.1
OCP V4.2.0
OceanBase Deployer (OBD) V2.3.1
OceanBase All in One V4.2.1
OceanBase Developer Center (ODC) V4.2.2
OceanBase CDC V4.2.1
OceanBase Migration Service (OMS) V4.2.0
OBClient V2.2.3
OceanBase Connector/C V2.2.3

Upgrade notes

  • An online upgrade of OceanBase Database Community Edition from V4.2.0_CE to V4.2.1_CE is supported.
  • An online upgrade of OceanBase Database Community Edition from V4.1.0_CE to V4.2.1_CE is supported.
  • We recommend that you upgrade OceanBase Database before you upgrade ODP.
  • During the upgrade, the system automatically disables major compactions and DDL operations. After the upgrade is complete, the system resumes normal operation.
  • An online upgrade of OceanBase Database Community Edition from V3.x_CE to V4.2.1_CE is not supported.
  • You can upgrade OceanBase Database Community Edition from V3.x_CE to V4.2.1_CE through logical data migration by using OMS.

版本信息

项目 描述
发布日期 2023-10-13
版本号 V4.2.1_CE
Commit 号 7b0f436
OBServer RPM 版本号 oceanbase-ce-4.2.1.0-100000102023092807

版本定位

OceanBase 数据库 V4.2.1_CE 版本是 V4.2.x_CE 版本系列的第一个长期支持版本(LTS),该版本新增了 VALUES 语句、JSON_TABLE 表达式等与 MySQL 兼容的功能,推出了 WR 数据采集框架和增强全链路诊断的产品化。同时,该版本还优化了系统资源的使用,并增加了表级恢复能力和对备份介质 COS 的支持。推荐将其用于常规业务的生产环境中。

关键特性说明

MySQL 兼容

  • VALUES Statement

    MySQL 8.0.19 引入 VALUES Statement。它可以用于快速地构建一组数据的 “表”;可以作为独立 DML 语句,支持配合 ORDER BY 和 Limit 使用;也可以作为特殊的 “表” 混合到普通的 DML 语句中。OceanBase 数据库 V4.2.1_CE 版本兼容 MySQL 模式支持了 VALUES Statement 功能,使得表值构造更加便捷易用。更多信息请参见 VALUES Statement

  • Rename Column

    MySQL 数据库从 8.0 开始支持 RENAME COLUMN 语法,方便用户在不改变列定义的前提下为列重新命名,比 CHANGE COLUMN 更加轻量。OceanBase 数据库从 V4.2.1_CE 版本开始兼容 MySQL 8.0 RENAME COLUMN 的语法。更多信息请参见 RENAME COLUMN

多模特性

  • JSON_TABLE 表达式

    JSON 是一种半结构化数据,用户可根据 Path 从 JSON 中抽取特定的 Value 值,也可通过 JSON_TABLE 表达式将半结构化数据转为结构化数据。OceanBase 数据库早期版本已经支持 JSON 数据类型,但 MySQL 模式下尚未实现 JSON_TABLE 表达式。为了解决部分用户将 JSON 转结构化数据参与运算的需求,V4.2.1_CE 版本在 MySQL 模式下也支持该表达式。详细使用说明见 JSON_TABLE

  • OBKV TTL

    TTL(Time To Live)是 NoSQL 数据库比较常用的功能,主要用于数据的自动过期老化。例如历史库业务, 需要周期性扫描数据, 判断过期时间,删除数据。目前有很多业务依赖 OBKV 的 Table 模型,为了方便周期数据管理,OceanBase 数据库从 V4.2.1_CE 版本支持了 OBKV TTL 能力。用户可通过建表语句定义表级/行级的 TTL 属性,做到 OBKV 读写不感知过期数据。更多信息请参见 TTL

性能提升

  • 并发 CREATE TABLE

    OceanBase 数据库早期版本 DDL 为串行设计,DDL 请求在 RootService 队列中串行执行。OceanBase 数据库 V4.1.0_CE 版本开始提供并发 DDL 能力,并支持了 TRUNCATE TABLE 的并发执行。为了解决百万表结构迁移的性能问题,V4.2.1_CE 版本支持了并发 CREATE TABLE,相对串行执行,带来十倍甚至数十倍的性能提升。

  • 外键检查性能优化

    OceanBase 数据库 V4.2.1_CE 版本之前,外键检查采用 INNER SQL 实现,开销较大。V4.2.1_CE 版本开始,通过 DAS TASK 进行外键查询,并支持单表 DML 的外键查询批处理,同时结合外键检查结果缓存策略,在 INSERT/UPDATE 场景下有明显性能提升。在单机场景下(父表和子表分布在同一台机器),和无外键表相比,外键表 INSERT/UPDATE 进行外键检查带来的性能回退基本可控制在 10% 左右;在分布式场景下(父表和子表分布在不同机器),和无外键表相比,外键表 INSERT/UPDATE 进行外键检查带来的性能回退基本可控制在 30% 左右。

  • MemTable 支持动态采样

    OceanBase 数据库 V4.2.0_CE 版本支持了一种在执行计划生成阶段对数据做采样的优化方案,即动态采样特性。当 SSTable 中的行数大于 MemTable 时,动态采样会选择使用 SSTable 的块采样。反之,当 MemTable 中的行数大于 SSTable 时,选择对 MemTable 做采样。V4.2.0_CE 版本是通过 MemTable 全量读取来实现的,效率相对较低,V4.2.1_CE 版本实现了 MemTable 的直接采样功能,通过 Range 切分完成区间读,使得 MemTable 动态采样更加高效。

  • 并行读取归档日志

    在 OceanBase 数据库 V4.1.0_CE 版本,OBCDC 支持了通过 CDCService 消费归档日志以及直接消费归档目的端的日志。在 V4.2.0_CE 版本中,网络直通备库复用了 CDC 拉取日志的协议框架,通过 CDCService 来拉取主库上的日志。CDCService 收到 OBCDC 或网络备库的拉取日志 RPC 请求后,会先尝试从本地磁盘上读取日志,如果因为日志流 GC 或者日志回收等原因,本地磁盘中对应的日志不存在,且租户开启了归档日志,那么 CDCService 便会读取归档目的端(如 NFS 或 OSS)上的日志。CDCService 读取日志的性能决定了下游消费日志的速率,如果读取 OSS 中的归档日志性能较差,可能导致同步链路或网络备库延时且难以追上。因此,基于并行消费 OSS 文件的基础能力,V4.2.1_CE 版本新增支持了 CDCService 并行消费 OSS 归档日志文件的功能。

资源优化

系统资源优化:该版本专项优化了公有云系统资源使用,包括用户租户内存、500 租户内存、操作系统内存等,典型的 128G 规格及以上的 ECS,系统资源使用的内存比例从 30% 降到 15% 左右。

高可用增强

  • 表级恢复

    OceanBase 数据库 V4.2.1_CE 版本之前,支持租户级数据恢复,如果误操作导致表的数据损坏,需要使用数据库的物理恢复功能将租户恢复到损坏之前的某个时间点,或者依赖导入导出功能实现表级数据恢复。新版本增加了对表级恢复功能的支持,用户可以在目标集群上指定使用哪个备份数据,恢复哪些库或表,在哪个租户下,以及恢复到哪个时间点。详细使用说明见 表级恢复

  • 备份介质 COS

    OceanBase 数据库 V4.1.0_CE 版本已支持 OSS 备份介质,V4.2.1_CE 版本补充支持 COS 备份介质。用户可将日志和数据信息备份到腾讯云的对象存储 COS 中,并支持从 COS 上读取备份数据完成数据恢复。

安全强化

数据完整性保护:信息系统商用密码应用安全性评估(简称密评)中对存储有数据的机密性和完整性保护要求。V4.2.1_CE 之前版本,OceanBase 数据库透明加密已支持 AES_ECDSM4_CBC(加密算法_工作模式),对存储数据提供了机密性保护。V4.2.1_CE 版本扩展支持了 GCM 模式。在对数据加密的基础上,结合密钥计算密文的校验和,在解密时对密文做校验,判断密文是否发生变化,以支持数据的完整性保护。

诊断能力提升

  • WR 数据采集框架

    数据库性能诊断的易用性直接影响了系统的调优效率。Oracle 数据库自 10g 起,提供了 ASH、AWR、ADDM 等自诊断的重要特性,提供了由内而外(不由外部组件采集)、自顶向下(DB Time)的数据库优化分析框架,经过几十年发展,已经成为行业标杆。OceanBase 数据库 V4.2.1_CE 版本开始实现了类似 Oracle AWR 的数据采集框架,对已有的 ASH、统计、等待事件、SQL 执行详情等数据进行采集,周期性地持久化 OceanBase 数据库性能相关视图。提供了 WR 视图供用户查询,支持通过 DBMS_WORKLOAD_REPOSITORY 包进行配置调整和快照管理。同时,新版本对 SYSSTAT、ASH 等统计指标进行了统一梳理、补充和强化,使之更加全面和精准。后续的版本也会在此基础上逐步提升 OceanBase 数据库的性能诊断能力。更多信息请参见 WR 概述

  • ASH 特性增强

    Active Session History(ASH) 是 OceanBase 数据库 V4.0.0_CE 版本引入的新特性,它能够以 1 秒为周期采样系统中所有 Active Session 状态,并记录进内部表中。在 V4.2.1_CE 版本更进一步,增加了事务、存储、DAS 相关采样点,并将 ASH 数据以 10:1 的采样率默认 1 小时为周期收集到 WR 内部表中。通过分析 ASH 数据,我们可以方便定位到长时间等待事件、慢 SQL 语句、活动会话的资源利用率等问题,从而进行性能优化。

  • 全链路诊断产品化

    OceanBase 数据库 V4.2.0_CE 版本已支持 SQL 请求的可视化全链路追踪,在此基础上 V4.2.1_CE 版本完善了全链路诊断的配置管理能力。新增 GV$OB_FLT_TRACE_CONFIG 视图,用于记录全链路诊断的各级别配置策略。在 GV$OB_PROCESSLIST 视图增加 LEVELSAMPLE_PERCENTAGERECORD_POLICY 列,用于展示 SESSION 上生效的监控级别、采样频率、记录打印策略等。同时在 GV$OB_SQL_AUDIT 视图中也新增了 FLT_TRACE_ID 列,记录全链路 TRACE 信息,做到 SQL 全方位追踪。OCP 也会配套提供页面功能。

产品行为变更

新增如下变更:

功能 变更点说明
Load Data 禁用 Trigger Load Data 并行执行,用于快速导入数据。并行执行和 Trigger 正交场景,可能存在 Trigger 正确性问题,因此在 V4.2.1_CE 版本已禁用。
tenant = all 语义变更
  • V4.2.1_CE 版本之前,tenant=all 语义不明确,在具体的使用场景,如配置项设置代表所有租户,备份恢复代表用户租户。
  • V4.2.1_CE 版本开始,修改 tenant=all 语义,改为 “仅包括所有用户租户,排除 SYS 和 META 租户”。新增语法,tenant=all_usertenant=all_meta,分别对应所有用户租户和所有 META 租户。修改后,tenant=alltenant=all_user 的语义完全相同,并计划在后续版本废弃 tenant=all 用法。
负载均衡开关细化
  • V4.2.0_CE 版本新增负载均衡与 Transfer 能力,可通过租户级配置项 enable_rebalance 进行控制。但 enable_rebalance 关闭时,也限制了用户 unit_numprimary_zone 等运维命令的修改,使用不够方便。
  • V4.2.1_CE 版本新增租户级配置项 enable_transfer,提供单独关闭租户下 Transfer 功能,与 enable_rebalance 共同控制租户均衡策略。
    • enable_rebalance=true, enable_transfer=true:根据负载均衡算法动态调整租户日志流数量,自动进行租户下的 Leader 均衡和分区均衡。
    • enable_rebalance=true, enable_transfer=false:不会产生 Transfer 和日志流数量动态变化,只在现有日志流基础上尽量做日志流均衡。
    • enable_rebalance=false, enable_transfer 无效: 不允许任何负载均衡相关运维命令。
OBCDC 大小写敏感 OBCDC 在 V4.2.1_CE 版本之前不区分大小写,新版本开始会支持大小写敏感策略。按照 lower_case_table_names=0/1/2 对应输出正确的库、表的大小写样式。
SSL 通信加密使用的 TLS 版本 在 V4.2.1_CE 版本之前,SSL 通信加密使用的 TLS 版本号没有限制,这意味着客户端可以通过较低版本号的 TLS 协议与数据库进行加密通信。然而,某些场景需要更高安全性的 TLS1.2 和 TLS1.3 协议。为了兼容旧版本客户端的需求,从 V4.2.1_CE 版本开始,可以通过配置项 sql_protocol_min_tls_version 来指定所使用的 TLS 协议的最低版本号。默认行为与之前的版本兼容。
调用带出参的存储过程不返回结果 MySQL 调用带出参的存储过程,返回结果不返回出参结果集。
  • V4.2.1_CE 版本之前会返回出参结果集,导致原生 MySQL 驱动执行报错。
  • V4.2.1_CE 版本进行了 MySQL 行为兼容,通过 OBClient 执行 CALL 语句后,不会再展示出参结果集。
禁用 zlib 压缩 V4.2.1_CE 版本禁止新建表使用 zlib 压缩,禁止已存在的表改成 zlib 压缩算法。

视图变更

新增如下变更:

视图 变更类型 变更说明
CDB/DBA_WR_CONTROL 新增 用于存储 WR 相关配置。
[G]V$OB_TENANT_RUNTIME_INFO 新增 用于展示租户运行详情。
[G]V$OB_SQL_AUDIT 新增列 新增 FLT_TRACE_ID 列,记录全链路 TRACE 信息。

配置项变更

新增如下变更:

配置项 变更类型 变更说明
memory_limit_percentage 修改取值范围 将 OBServer 可用的内存比例上限从 90% 调整到 95%。大规格机器,允许 OBServer 使用更多资源。
sql_protocol_min_tls_version 新增 集群级配置项,用于设置 SQL 语句进行 SSL 连接时,使用的 SSL/TLS 协议的最低版本号。默认为 none,表示不对连接使用的 LTS 版本号进行限制。

说明

该配置项只是对于 SSL 选择的版本号进行控制,具体开启 SSL 还是需要通过 ssl_client_authentication 设置。

enable_transfer 新增 租户级配置项,用于控制是否允许在租户内进行 Transfer。关闭配置项 enable_rebalance 时此配置项无效。默认为 True,表示开启。
compaction_dag_cnt_limit 新增 租户级配置项,配置 Compaction DAG 队列的 DAG 数量上限。默认为 15000。在百万分区场景,调大该配置项,可以适当提高 Compaction 速度,但会多占用一些内存。
compaction_schedule_tablet_batch_cnt 新增 租户级配置项,配置 Compaction 分 Batch 调度时,每个 Batch 调度的分区数上限。默认为 50000。在百万分区场景,调大该配置项,可以适当提高 Compaction 速度,但调度线程工作时间会变长,CPU 占用会更高。
server_cpu_quota_min 修改默认值/取值范围 默认值从 1 变更为 0,取值范围变更为 [0, 16]。取值为 0 时,代表 sys 租户规格自适应调整。
server_cpu_quota_max 修改默认值/取值范围 默认值从 1 变更为 0,取值范围变更为 [0, 16]。取值为 0 时,代表 sys 租户规格自适应调整。

周边配套

OceanBase 数据库 V4.2.1_CE 版本推荐使用的平台工具版本如下:

组件 版本
ODP V4.2.1
OCP V4.2.0
OBD V2.3.1
All in One V4.2.1
ODC V4.2.2
OBCDC V4.2.1
OMS V4.2.0
OBClient V2.2.3
LibOBClient V2.2.3

升级说明

  • 支持 OceanBase 数据库 V4.2.0_CE 版本在线升级到 OceanBase 数据库 V4.2.1_CE 版本。
  • 支持 OceanBase 数据库 V4.1.0_CE 版本在线升级到 OceanBase 数据库 V4.2.1_CE 版本。
  • OceanBase 数据库和 ODP 升级顺序:建议先升级 OceanBase 版本,再升级 ODP 版本。
  • 升级期间,系统会自动禁用合并和 DDL 操作,升级完成后恢复正常使用。
  • 不支持从 OceanBase 数据库 V3.x_CE 版本在线升级到 OceanBase 数据库 V4.2.1_CE 版本。
  • 支持通过 OMS 将 OceanBase 数据库 V3.x_CE 版本数据使用逻辑迁移升级到 OceanBase 数据库 V4.2.1_CE 版本。

v4.1.0_CE_BP4_HF1

7 months ago

Version information

Information Description
Release date October 8, 2023
Version V4.1.0_CE_BP4_HF1
Commit number c8a22da
OBServer RPM version oceanbase-ce-4.1.0.2-104010012023100710

Overview

This version addressed several customer and internal testing issues to enhance product stability.

Bug fixes

Fixed the issue where the query results might be incorrect when the query plan included the EXCHANGE OUT DISTR (PKEY) field. This issue occurred when parallel JOIN operations were performed on partitioned tables during the upgrade where multiple versions were running at the same time.

版本信息

项目 描述
发布日期 2023-10-08
版本号 V4.1.0_CE_BP4_HF1
Commit 号 c8a22da
OBServer RPM 版本号 oceanbase-ce-4.1.0.2-104010012023100710

发版目的

解决客户及内部测试遇到的问题,提升版本稳定性。

缺陷修复

修复在升级期间(不同版本同时运行),对分区表并行执行 JOIN 操作的场景下,当查询计划中包含 EXCHANGE OUT DISTR (PKEY) 时,查询结果可能不正确的问题。

v4.1.0_CE_BP4

7 months ago

Version information

Information Description
Release date September 25, 2023
Version V4.1.0_CE_BP4
Commit number 6059cef

Overview

  • This version addressed several customer and internal testing issues to enhance product stability.
  • Disable the temporary table feature in MySQL mode.

Bug fixes

版本信息

项目 描述
发布日期 2023-09-25
版本号 V4.1.0_CE_BP4
Commit 号 6059cef

发版目的

  • 解决客户及内部测试遇到的问题,提升版本稳定性。
  • MySQL 模式下禁用临时表功能。

缺陷修复

v4.2.0_CE_BP1

8 months ago

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

  1. 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 from False to True, it needs to be changed back to False. Otherwise, the OBserver node might encounter exceptions after a restart.

  2. 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 修复

注意事项

  1. V4.1.0_CE_BP3 版本到 V4.2.0_CE 之间的版本,如果将隐藏配置项 _optimizer_better_inlist_costing 的默认值 False 改为 True,那么需要将其改回 False。否则,可能会导致重启后运行异常的问题。
  2. 如果您想从 V4.1.0 版本升级到 V4.2.0 版本,建议您直接升级到 V4.2.0_CE_BP1 或更高版本,以避免因升级可能触发的事务超时问题。

v4.2.0_CE

8 months ago

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

版本信息

项目 描述
发布日期 2023-09-04
版本号 V4.2.0_CE
Commit 号 7e912e0
OBServer RPM 版本号 oceanbase-ce-4.2.0.0-100010032023083021

发版目的

  • 解决客户及内部测试遇到的问题,提升版本稳定性。
  • 社区版支持 MySQL 租户间的 DBLINK 读功能。
  • MySQL 模式下禁用临时表功能。

缺陷修复