OceanBase v4.2.5_CE_BP7: Optimized Leader Election, SQLSTAT, and OSS WORM Support

OceanBase has released version v4.2.5_CE_BP7 (Build Patch 7) on December 5, 2025. This update focuses on improving high availability through smarter leader election, expanding observability with new SQLSTAT metrics, and ensuring data compliance via OSS WORM support.

Upgrade Paths

Administrators can upgrade to this version from specific previous releases:

  • V4.2.1_CE_BP10 and earlier: Must first stop at V4.2.1_CE_BP11, then upgrade to v4.2.5_CE_BP7.
  • V4.2.2_CE: Must stop at V4.2.2_CE_BP1 before upgrading to v4.2.5_CE_BP7.
  • V4.2.3_CE, V4.2.4_CE, and V4.2.5_CE: Can upgrade directly to v4.2.5_CE_BP7.

Key Features and Enhancements

Optimized Leader Election (4F1A Scenario)

In previous versions, when high-priority zones (e.g., z1, z2) in a 4F1A (4 Faults, 1 Availability) scenario became unavailable, the system would elect the Zone with the lowest IP address as the new leader. This often resulted in all leaders migrating to a single low-priority zone (e.g., z3), creating an imbalance.

This release introduces an optimized election strategy. When all high-priority zones are down, leaders are now uniformly distributed across lower-priority zones (e.g., z3 and z4), improving system stability and high availability.

SQLSTAT Observability Enhancements

The SQLSTAT module now supports additional metrics to aid in performance diagnosis:

  • multi_query: Used to identify routing errors and synchronous commits.
  • muti_query_batch_execute: Indicates whether a statement is utilizing batch optimization.
  • full_table_scan: Tracks the frequency of full table scans.
  • error_count: Statistics on SQL error occurrences.
  • These metrics are accessible via views such as GV$OB_SQLSTAT and DBA_WR_SQLSTAT.

ASH Report Generation Acceleration

The generation of Active Session History (ASH) reports involves joining ASH and WR data, which can be time-consuming. This update accelerates this process without altering the report's output behavior.

Backup Archive Adaptation for OSS WORM

OceanBase now supports Alibaba Cloud OSS WORM (Write Once Read Many) features. Users can configure retention policies on OSS Buckets. Backups archived to these compliant buckets cannot be modified or deleted until the retention period expires, helping meet data security and regulatory requirements.

Syntax and View Changes

The release introduces several syntax changes and new columns in system views:

  • Syntax: UPDATE statements now support SET with parentheses (e.g., SET (col)=xxx); WITH CHECK OPTION now supports subqueries; and a new function DBMS_METADATA.GET_TABLE_INDEX_DDL allows batch extraction of index DDL.
  • Views: DBA_OB_UNITS and [G]V$OB_UNITS gained a replica_type column. Multiple SQLSTAT views (CDB_WR_SQLSTAT, DBA_WR_SQLSTAT, etc.) added columns for batch execution totals/deltas, multi-query totals/deltas, full table scan totals/deltas, and error counts.

Notable Bug Fixes

The release addresses a wide range of stability and compatibility issues, including:

  • Fixing plan generation failures for statements with NULL types.
  • Resolving MySQL tenant exceptions and index creation errors under specific configurations (e.g., lower_case_table_names=0).
  • Correcting memory leaks and regex timeout errors (U_REGEX_TIME_OUT).
  • Fixing leader election and lock contention issues during concurrent operations.
  • Addressing data loss issues in column deletion operations.