V3.2.4
Version information
- Release date: November 1, 2022
- Version: V3.2.4
Overview
Compared with V3.2.3, OceanBase Database V3.2.4 improves the compatibility and stability of the database kernel to meet the production and testing requirements of customer systems. Core enhancements:
Enhanced compatibility with MySQL
The geographic information system (GIS) and MySQL binlog parsing are supported. The DBMS_RESOURCE_MANAGER system package is added.
Enhanced compatibility with Oracle
The DBMS_SCHEDULER system package is added. System package functions are supplemented.
Kernel enhancements
SQL rule-based resource isolation, the IPv6 protocol, backup to OBS, log optimization, transaction size configuration, and configuration of the number of logon threads are supported.
New features
Enhanced compatibility
Compatibility with MySQL
Support for GIS
GIS provides the storage, computing, and indexing capabilities for spatial objects such as points, lines, planes, and complex spatial objects. GIS is widely applied in the transportation industry and can help quickly build spatial computing capabilities. GIS is supported since OceanBase Database V3.2.4. GIS in OceanBase Database adopts the quadtree-based indexing solution and supports the GIS data types of MySQL 8.0, the management and caching of spatial reference system (SRS) metadata, quadtree-based spatial indexes, single-value types (GEOMETRY, POINT, LINESTRING, and POLYGON), and multi-value types (MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, and GEOMETRYCOLLECTION). The spatial computing functions commonly used in MySQL 8.0 are also implemented. For more information, see Functions for spatial computing.
Support for MySQL binlog parsing
The OceanBase CDC data synchronization solution supports MySQL binlogs and allows popular applications, such as Canal, Debezium, and Flink CDC, to generate and parse binlogs in OceanBase Database. The OBServer must support binlog-related system variables such as binlog_format, binlog_row_image, log_bin, and server_uuid. The REPLICATION SLAVE and REPLICATION CLIENT privileges can be set. OceanBase CDC parses clogs in OceanBase Database into binlogs for subscription and consumption by downstream products. For more information, see binlog_row_image.
Addition of the DBMS_RESOURCE_MANAGER system package
The DBMS_RESOURCE_MANAGER system package is added for creating and maintaining resource consumer groups, resource management plans, and binding rules of resource consumer groups. More functions are supported, such as CREATE_CONSUMER_GROUP, CREATE_PLAN, and SET_CONSUMER_GROUP_MAPPING.
Compatibility with Oracle
Addition of the DBMS_SCHEDULER system package
The DBMS_SCHEDULER system package is added for managing scheduled tasks. More functions are supported, such as CREATE_JOB, CREATE_PROGRAM, and DEFINE_PROGRAM_ARGUMENT.
Supplementation of system package functions
- The DBMS_SESSION.SET_CONTEXT function is supplemented for setting or resetting the value of the context attribute.
- The DBMS_SESSION.CLEAR_CONTEXT function is supplemented for clearing the specified context.
- The UTL_RAW.CAST_TO_BINARY_INTEGER function is supplemented for converting the RAW binary representation of a BINARY_INTEGER value into a BINARY_INTEGER value.
Kernel enhancements
Support for SQL rule-based resource isolation
In real practice, more fine-grained control of resource isolation is required for business. For example, different SQL statements are executed by using different resource specifications for isolation. This helps allocate and isolate resources for business systems such as OLAP and OLTP, and reduces the mutual impact between business systems.
OceanBase Database V3.2.4 supports creating resource groups and binding users to resource groups. When a user executes a business SQL statement, OceanBase Database allocates the corresponding resource group based on the predefined SQL rules to help the user define a business resource isolation plan. At present, the resource isolation plan applies only to CPU resources. For more information, see Multi-tenant resource isolation.
Support for the IPv6 protocol
IPv6 is widely applied in customer projects as it gains popularity among communications network suppliers and terminal vendors. OceanBase Database V3.2.4 and related components, such as ODP and JDBC, support IPv6. OceanBase clusters support both IPv4 and IPv6 TCP/IP connections. Before you use IPv6, make sure that the operating system of your server is configured to support IPv6. For more information, see IS_IPV6.
Support for backup to OBS
Backup and restore is a core feature for ensuring the high availability of OceanBase Database. OceanBase Database supports three backup media: Alibaba Cloud Network File System (NFS), Alibaba Cloud Object Storage Service (OSS), and Tencent Cloud Object Storage (COS). OceanBase Database supports backup to HUAWEI CLOUD Object Storage Service (OBS) since V3.2.4. You can specify the backup destination (backup_dest) to back up data and log files to OBS. For more information, see Preparations for backup.
Log optimization OceanBase Database V3.2.4 optimizes log output in the following aspects:
Log level definition: The DIAG log level is added. WARN and ERROR logs that do not need to be perceived by users are classified into DIAG logs. The levels are adjusted for O&M-oriented WARN and ERROR logs that need to be retained.
Log level Intended audience Definition Original log level ERROR DBA or users The OBServer cannot provide normal services. For example, the disk is full or the listening port is occupied. An ERROR log may also be generated when an error is returned during an internal check in the background. For example, 4377 indicates a DML defensive check error, and 4103 indicates a data checksum error. In this case, manual intervention is required. WARN DBA or users An unexpected scenario occurs. The OBServer can provide services, but the behavior is not as expected. Example: a write throttling warning. INFO DBA or users System status changes. INFO EDIAG R&D Error diagnosis information for troubleshooting. This log level indicates an unexpected logical error. For example, function parameters are not as expected. ERROR WDIAG R&D Warning diagnosis information for troubleshooting. This log level indicates an expected error. For example, a function fails to return a value. WARN TRACE R&D Task-level diagnosis information. TRACE DEBUG R&D Debugging details. DEBUG Error code association: Error messages are classified and error codes are improved. A response error code is defined for each warning and error. You can retrieve documents based on an error code to find the solution.
Throttling by error code: WDIAG logs are throttled by error code. For throttled logs, only the error code and the number of throttled logs are displayed. The
diag_syslog_per_error_limitparameter is added for controlling this throttling feature. By default, 200 DIAG logs per second are allowed for each error.Monitoring log removal: The
dump tenant info,memory info, andeasy statlog entries are removed from log files for separate management.Log file self-description: The server address, host type, CPU type, operating system version, OBServer version, and time zone are recorded in the header of each log file.
Other feature enhancements
- You can configure the transaction size by using the
_max_trx_sizeparameter. - You can configure the number of logon threads by using the
sql_login_thread_countparameter. - You can set table-level parallel hints. Example:
select /*+ parallel(t1, 8) */ from t1;.
- You can configure the transaction size by using the
Compatibility changes
Parameters
| Parameter | New/Change | Default value | New default value | Description |
|---|---|---|---|---|
| enable_cgroup | New | / | True | Specifies whether to enable the control group feature. |
| sql_login_thread_count | New | / | 0 | The number of threads for processing logon requests. The default value is 0, which indicates that the number of threads is dynamically adjusted. |
| ob_query_switch_leader_retry_timeout | New | / | 0us | The longest retry time for a failed query. The default value is 0us, which indicates that the retry timeout check is disabled. |
| diag_syslog_per_error_limit | New features | / | 200 | The number of diagnostic logs for each error code per second. |
| ob_esi_syslog_level | Modification | INFO | WDIAG | The log level of independent subprocesses. |
| syslog_level | Modification | INFO | WDIAG | The level of system logs. |
System changes
| Parameter | New/Change | Recommended value | Description |
|---|---|---|---|
| binlog_format | New | ROW | The supported binlog format. This parameter takes effect when log_bin is set to ON. |
| binlog_checksum | New | CRC32 | The supported binlog checksum. |
| binlog_rows_query_log_events | New | OFF | Specifies whether to write row query log events into the binlog. This parameter applies to the row-based logging. |
| log_bin | New | ON | The supported binlog enabling status. |
| server_uuid | New | Generated upon tenant creation | The instance UUID. |
Behavior changes
- Differences between the new system log levels used in OceanBase Database V3.2.4 and the log levels in earlier versions:
The log levels are ERROR, WARN, INFO, EDIAG, WDIAG, TRACE, and DEBUG in descending order of priority.
The WARN log level in earlier versions changes to the WDIAG level in V3.2.4. Therefore, WARN logs in earlier versions are generated as ERROR logs in V3.2.4.
Upgrade path
An upgrade from V3.2.1, V3.2.2, or V3.2.3 to V3.2.4 is supported. However, an upgrade from V3.2.3 BP6 and later to V3.2.4 is not supported.
An upgrade from V3.1.2 to V3.2.4 is supported. You must download the software packages V3.2.0, V3.2.1, V3.2.2, and V3.2.3, and upload them to OCP.
An upgrade from V2.2.77 is supported. You must upgrade OceanBase Database to V3.1.2 first and then to V3.2.4.
Supported components
The following table describes the recommended versions of components used with OceanBase Database V3.2.4.
| Component | Version |
|---|---|
| ODP | V3.2.8 |
| OCP | V3.3.4 |
| ODC | V4.0.0 |
| OMS | V3.4.0 |
| OBCI | V2.0.2 |
| ECOB | V1.1.6 |
| JDBC | V2.2.11 |
| OBClient | V2.1.1.3 |
Considerations
- The
open_cursorsparameter specifies the maximum number of open cursors that a session can have at once. The default value is 50. OceanBase Database V3.2.4 changes the maximum number of prepared statements for a single session. Therefore, if you upgrade your database to V3.2.4, you must determine whether to increase the value ofopen_cursorsto avoid errors when prepared statements are executed.
V3.2.4 BP1
Version information
- Release date: January 9, 2023
- Version: V3.2.4 BP1
Enhanced features
Security optimization
You can change the AccessKey ID and AccessKey Secret during data backup and restore. The backup feature of OceanBase Database allows you to specify an Alibaba Cloud Object Storage Service (OSS), Tencent Cloud Object Storage (COS), or Huawei Object Storage Service (OBS) bucket as the backup destination. However, you cannot modify the
access_idoraccess_keyparameter of the backup destination during the backup. If the AccessKey ID or AccessKey Secret is changed, you must stop the log backup and change the backup directory. Therefore, this version provides theALTER SYSTEM change external_storage_dest PATH[=]'xxx?host=xxx' set ACCESS_INFO[=]'access_id=xxx&access_key=xxx';command for you to modify the AccessKey ID and AccessKey Secret of the backup destination. The relevant content in GConf is updated and saved accordingly. Observe the following considerations when you use this command:- Before you run the command to update the AccessKey ID and AccessKey Secret for accessing the OSS, COS, or OBS bucket, we recommend that you stop the ongoing second backup task. We also recommend that you delete the old AccessKey ID and AccessKey Secret one hour later after you run the command.
- If you modify the AccessKey ID and AccessKey Secret during a second backup task, and the task is stuck, you must forcibly cancel the task and change the directory to resume to task.
The password information configured by using a DBLink can be encrypted for storage.
Remote Procedure Call (RPC) authentication is supported for communication between OBServer nodes.
Transparent data encryption (TDE) is integrated into Alibaba Cloud Key Management Service (KMS).
Monitoring statistics optimization: Transaction time statistics and SQL execution time statistics are added to the
v$sysstatview.- Transaction time statistics metrics include
sp trans total used timeanddistributed trans total used time. - SQL execution time statistics metrics include
sql local execute time,sql remote execute time, andsql distributed execute time.
- Transaction time statistics metrics include
Compatibility with MySQL PL syntaxes:
GET DIAGNOSTICS,GET STACKED DIAGNOSTICS CONDITION,DECLARE CONTINUE HANDLER,SIGNAL SQLSTATE, and DEFINER syntaxes are supported.Performance optimization: You can use arrays to execute simple statements such as INSERT...VALUES, UPDATE, and DELETE in batches. This improves the batch execution performance by about 4 times.
Compatibility changes
- The default value of the
schema_history_expire_timeparameter is changed from7dto30d. - The default value of the
ob_esi_session_timeoutparameter is changed from1mto10m. - The
rpc_client_authentication_methodparameter is added to specify the security authentication method of the RPC client. The setting takes effect immediately. Valid values areNONE,PLAIN_KEY,SSL_NO_ENCRYPT, andSSL_IO. The default value isNONE. - The
rpc_server_authentication_methodparameter is added to specify the security authentication method of the RPC server. The setting takes effect immediately. Valid values areNONE,ALL,PLAIN_KEY,SSL_NO_ENCRYPT, andSSL_IO. The default value isALL.
Fixed issues
- In Oracle mode, when a package uses a cursor for loop operations, the error code 4179 is returned.
- When data is deleted from a table with a foreign key, the internal execution process abnormally triggers parallel threads when it handles the foreign key, causing a timeout error.
- When a tenant is released, a resource release exception occurs. As a result, an error indicating insufficient resources is returned when a tenant is created later.
- When an execution plan hits the plan cache, the execution result of MERGE INTO is incorrect.
- Memory leak occurs when indexes are created on JSON generated columns.
Considerations
- To use Key Management Service (KMS), upgrade liboblog to V3.2.4.0 or later and then upgrade OceanBase Database to V3.2.4 BP1.
- If a large query triggers a deadlock in a scenario where ArrayBinding or
CREATE TABLE AS SELECTis used, we recommend that you increase the value of thelarge_query_thresholdparameter to avoid triggering deadlocks.
V3.2.4 BP2
Version information
- Release date: February 28, 2023
- Version: V3.2.4 BP2
Enhanced features
- The system package UTL_RAW in Oracle mode supports the
CAST_TO_NVARCHAR2()function, which converts RAW values into NVARCHAR2 values. - DBLinks support DNS resolution in Oracle mode.
- The system functions
XMLAGG(),XMLPARSE(), andXMLELEMENT()are supported in Oracle mode. - The
FROM_BASE64()andTO_BASE64()functions are supported in MySQL mode. - OceanBase Database of this version is compatible with the
DEFAULT_STORAGE_ENGINEandEVENT_SCHEDULERsystem variables in MySQL mode. - The value
11is available for theREQUEST_TYPEfield in theV$OB_SQL_AUDITview. This value indicates that the SQL statement is executed in PL.
Considerations
- ArrayBinding is not recommended for batch insertion in this version. We recommend that you always set
ob_enable_batched_multi_statementtoFalse. - When you upgrade OceanBase Database Enterprise Edition from V3.2.4 or V3.2.4 BP1 to V3.2.4 BP2, election without leader may occur during the upgrade. After all OBServer nodes are started, normal election resumes and the cluster is upgraded.
Fixed issues
- When the number of SSTable macroblocks is too large and more than 32 MB of data is written in the slog file, an error is reported and the major compaction of the cluster is stuck .
- The execution result is wrong in MySQL mode because the filters applied by the NEST LOOP JOIN operator is abnormal.
- When the macroblock reuse logic is abnormal, a large number of macroblocks are rewritten, resulting in excessive I/Os during the major compaction of the cluster.
- When an SQL statement has four or more index columns in a WHERE clause and an index is hit and contains
in expr, the result set returned by the query is incorrect in some scenarios. - When data of OceanBase Database V2.2.77 is restored by using OceanBase Database V3.2.4, the leader is stuck.
- In Oracle mode, when
AUTO COMMITis disabled, after some data is inserted, the SELECT statement in a user-defined function (UDF) cannot read uncommitted data. - In Oracle mode, when
AUTO COMMITis enabled, after a transaction is manually started and the executed PL package contains DML statements, the transaction is automatically committed.
V3.2.4 BP3
Version information
- Release date: April 19, 2023
- Version: V3.2.4 BP3
Enhanced features
The OBKV connection count feature is added, which simplifies the process for locating OBKV request issues.
- The
GV$OB_KV_CONNECTIONSview is added, which allows you to query all active sessions of the KV class in the current tenant. - The
V$OB_KV_CONNECTIONSview is added, which allows you to query all active sessions of the KV class on the current OBServer node.
- The
The call of the CURRVAL function to obtain the current value of a sequence across OBServer nodes is optimized.
- In earlier versions, when OceanBase Database Proxy (ODP) connects to an OBServer node, if a route switch occurs in between consecutive NEXTVAL and CURRVAL calls, an error is reported when you call CURRVAL on another OBServer node.
- This version supports cross-route synchronization of CURRVAL calls when ODP connects to an OBServer node. The call of CURRVAL on another OBServer node returns the value obtained by the last NEXTVAL call.
Other changes
INSERT VALUES for inserting multiple rows of data in MySQL mode is supported. In MySQL mode, if you do not specify the strict mode for
SQL_MODE, when you insert NULL to fields with the NOT NULL constraint, an error is reported if you use INSERT VALUES to insert a single row of data, and the operation succeeds but a WARNING alert is generated if you use INSERT VALUES to insert multiple rows of data, same as in MySQL Database.Sorting for SET QUERY result sets is supported in Oracle mode.
- The serial execution and sequential output feature of Oracle Database is supported. You can set the tenant- or session-level variable
_force_order_preserve_setenable this feature. - For performance considerations, by default, HASH operators, such as set operators like UNION ALL, UNION, MINUS, INTERSECT, and EXCEPT, are used instead of MERGE operators for parallel execution.
- The serial execution and sequential output feature of Oracle Database is supported. You can set the tenant- or session-level variable
Parameter changes
| Parameter | New/Change | Default value | Description |
|---|---|---|---|
_large_query_yield_timelimit |
New | 30s | The wait timeout period for large queries. It is a cluster-level parameter. Value range: (0ms, + ∞]. |
_with_subquery |
New | 0 | The common table expression (CTE) optimization strategy of the optimizer. It is a tenant-level parameter. Valid values:
|
_xsolapi_generate_with_clause |
New | true | Specifies whether the optimizer actively extracts CTEs. It is a tenant -level parameter. Valid values: [true, false]. |
_optimizer_group_by_placement |
New | true | Specifies whether the optimizer enables the rewrite feature for GROUP BY PLACEMENT. It is a tenant -level parameter. Valid values: [true, false]. |
System variable changes
| System variable | New/Change | Default value | Description |
|---|---|---|---|
_force_order_preserve_set |
New | false | Specifies the rewrite behavior and the plan generation logic of SET QUERY. If this variable is set to true, the branches are executed serially and the result sets are output in sequence. It is a global or session-level variable. Valid values: [true, false].
Note |
Considerations
The _max_trx_size parameter allows you to limit the transaction size to ensure system stability. If the parameter is set to 0, the transaction size is not limited. The default value is 100M. Observe the following considerations when you configure this parameter:
- The
_max_trx_sizeparameter setting does not take effect, except for V2.x and earlier and V3.2.4 and later. - When you upgrade from a version in which this parameter does not take effect to V3.2.4 or V3.2.4 BP, the transaction size is changed from unlimited to a maximum size of 100 MB. If you do not want to limit the transaction size, set this parameter to
0before the upgrade.
Fixed issues
- When columns C1, C2, and C3 have indexes, if an SQL statement contains the
(C1 = ? OR C1 = ? ...) AND C2 IN (...) AND C3 ...condition, the range extraction is abnormal, causing incorrect results. ORA-00600: internal error code, arguments: -4016, Internal erroris reported when the SUBSTRB function is used in a DML statement in PL and the parameters include variables defined in PL.- In Oracle mode, when a package variable is used as the output parameter for internal calls, the stored procedure execution result is incompatible with that of the native Oracle database.
- When UPDATE IGNORE is not processed during expression precalculation, OceanBase Database takes a long time to get the plan.
- When an automatic cleanup task is normally scheduled, backup pieces that are expected to be cleaned up are not deleted.
- A memory leak occurs when a SELECT statement is parsed in an INSERT ALL statement.
- When a filter condition is pushed down, the execution result is not as expected due to abnormal return results of the expression.
- Some indexes are in the abnormal state after physical restore.