This topic describes the new features and changes of OceanBase Database Community Edition V3.1.1 based on the previous version.
Overview
OceanBase Database Community Edition V3.1.1 enhances the kernel compatibility, tool ecosystem, APIs, backup and restore, support for open source OSs, and ease of use as an open source product. This version provides the following key features:
MySQL 5.7 drivers and protocols are supported.
Common Table Expressions (CTEs)of MySQL 8.0 are supported to enrich the SQL capabilities of OceanBase Database Community Edition to meet complex business query requirements.The verification function
CRC32()is provided to improve the data verification when you migrate data from MySQL Database to OceanBase Database.The physical backup and restore feature is provided to support near-real-time data backup and restore to any earlier point in time. This enhances the disaster recovery of OceanBase Database Community Edition.
Table API is provided to read and write KV model data, which improves the data storage and access performance.
REDO logs can be accessed by using Change Data Capture (CDC). This allows you to extract incremental data from OceanBase Database and share it with third-party data synchronization products in real time.
Prometheus is supported to enhance performance monitoring and diagnostics.
ob_adminandob_errorare provided to improve troubleshooting and emergency handling capabilities.New command parameters of OceanBase Deployer (OBD) are provided. Automatic parameter configuration is supported. New tenant management commands are provided. Common database performance testing frameworks are provided to help OceanBase Database beginners get started with ease.
New features
Compatibility with MySQL
MySQL 5.7 drivers and protocols are supported.
CTEs are supported. Recursive and non-recursive CTEs in the syntax of MySQL 8.0 are supported. A CTE is equivalent to a temporary table but does not occupy any storage space. It is used only during query execution and enriches the SQL features. For more information, see PR 314.
The system function
CRC32()is supported. You can verify a string by calling this function to calculate theCRC32checksum of the string. Example:SELECT CRC32("abc");. For more information, see PR 152.The system function
CONVERT_TZ()is supported. You can call this function to convert a time value from one time zone to another. Example:SELECT CONVERT_TZ('2021-01-01 12:00:00','+00:00','+08:00');. For more information, see PR 276.The following network address-related functions are supported:
INET_ATON(),INET_NTOA(),INET6_ATON(),INET6_NTOA(),IS_IPV4(), IS_IPV6(),IS_IPV4_MAPPED(), andIS_IPV6_MAPPED(). For more information, see PR 198.Settings for the maximum number of tenant/user connections are supported. The system parameter
MAX_CONNECTIONSspecifies the maximum allowed number of tenant connections. The system parameterMAX_USER_CONNECTIONSspecifies the maximum allowed number of concurrent user connections. When you create a user, you can set theMAX_USER_CONNECTIONSparameter to specify the maximum allowed number of concurrent connections for the user. TheMAX_CONNECTIONS_PER_HOURparameter specifies the maximum allowed number of connections for the user per hour.
High availability
Physical backup and restore are supported. Physical backup allows you to back up data of a cluster, including full data backup, incremental data backup, and near-real-time backup of commit logs. A backup can be triggered in seconds. Physical recovery allows you to recover data of a tenant to any earlier point in time. For example, a few seconds ago.
Ease of use
OBD automatically configures OceanBase parameters based on system resources. The
obd cluster autodeploycommand is provided, which supports the automatic start of OceanBase Database with the highest specifications. You can run theobd cluster tenant create/dropcommand to create or delete a tenant. For more information, see obd cluster tenant create.OBD supports automatic tests. OBD can be integrated with the
mysql_test,TPC-H, andSysbenchtesting frameworks. For more information, see OBD commands for tests.ob_error, an error code parsing tool is provided.ob_errorhelps you obtain the help information based on the returned error code of OceanBase Database. Example:ob_error [option] errorcode. For more information, see ob_error tool.ob_admin, an administrator tool is provided. ob_admin allows you to parse transaction logs and convert transaction IDs to enhance the analysis and diagnosis of issues. Example:ob_admin clog_tool/usec_tools <args>.
Open source APIs
The open source Table API is provided. You can call the API in NoSQL mode in OceanBase Database. The Table API is an operation API for the table model and KV model data. It defines a set of common interaction protocols between the client and the database server. The Table API allows you to call the
execute()function to execute single-row operations and thebatch_execute()function to execute multi-row operations. The Table API also supports the following operations:RETRIEVE/GET,INSERT_OR_UPDATE/PUT,DELETE,INSERT,UPDATE,REPLACE,INCREMENT, andAPPEND.Open source CDC is provided. CDC allows external applications to access the transaction logs in OceanBase Database. As part of the data access link, CDC parses, extracts, and assembles transaction logs to provide data for downstream data synchronization consumers. For example, the CDC API can be connected to Canal for incremental data migration.
Community ecosystem
Data synchronization tools such as Canal and DataX are supported. You can migrate data from a MySQL database to OceanBase Database. You can also use DataX to migrate full data to OceanBase Database.
The Prometheus monitoring system is supported to enhance the cluster monitoring feature of OceanBase Database Community Edition. For example, it monitors the resource usage (including CPU, memory, I/O, and network resources), system load (such as SQL latency, active sessions, and cache retrieval rate), and cluster constraints (such as NTP clock synchronization).
The DBeaver client tool is supported. For more information, see New database integration - OceanBase and PR 13596.
Deployment of OceanBase Database in Docker containers is supported.
Multiple x86-based operating systems are supported. For more information, see OS compatibility list.
Compatibility changes
| Parameter | Previous default value | Change type | New default value | Description |
|---|---|---|---|---|
| minor_freeze_times | 5 | Modification | 100 | The number of minor compactions in the memory is increased to postpone the major compaction of rows in the memory. This improves performance stability during data writes in large batches. |
| freeze_trigger_percentage | 70 | Modification | 50 | The threshold to trigger a minor compaction in the memory is reduced. In this way, minor compactions in the memory are performed at a higher frequency to avoid errors due to memory shortage. |
| enable_merge_by_turn | TRUE | Modification | FALSE | The rotating compaction by zone is disabled to avoid the business impact due to unnecessary leader/follower switchovers. |
| trace_log_slow_query_watermark | 100 ms | Modification | 1s | The query execution time threshold for defining a slow SQL query is increased to reduce slow query logs and thus the impact on disk I/O. |
| clog_sync_time_warn_threshold | 100 ms | Modification | 1s | The warning threshold of the clog synchronization period is increased to reduce synchronization logs. |
| enable_one_phase_commit | TRUE | Modification | FALSE | This parameter is deprecated in the new version. |
| enable_pg | FALSE | Delete | -- | This parameter is deprecated in the new version. |
| _enable_split_partition | FALSE | Delete | -- | This parameter is deprecated in the new version. |
Fixed issues
An error is returned when an aggregate function is used with its alias. For example, if you use an aggregate function for a field and use the alias of the function for the results of the same field, you must use the alias to sort the results.
When you call the TIMEDIFF() function, if any of the two parameters has more than 2 decimal places, NULL is returned.
An error is returned when you query a view in another OceanBase database.