An OceanBase cluster can be upgraded by using an upgrade script. The upgrade process is transparent to applications, so no cooperation from the applications is required during the upgrade. The OceanBase cluster is upgraded zone by zone. During the upgrade, the leader partition is actively switchover between zones, and the business of the zone to be upgraded is migrated to other zones.
This topic describes the upgrade limitations, considerations, and paths of OceanBase Database.
Notice
OceanBase Database V4.3.x cannot be upgraded from V4.2.x or earlier.
Limitations
There are the following limitations when upgrading an OceanBase cluster:
- DDL is prohibited: DDL is prohibited during some stages of the upgrade. It will be automatically enabled after the upgrade is complete.
major freezeis prohibited: The major compaction is prohibited during the upgrade. It will be automatically enabled after the upgrade is complete.- Replication and load balancing are prohibited: The upgrade prohibits replication and load balancing. If you attempt to migrate tenants or rebalance the load during the upgrade, the system will block the corresponding requests.
- Physical backup and restore are prohibited: During the upgrade, baseline backups (log archives) are continuously generated, but physical restores are prohibited. If you attempt to initiate a physical restore during the upgrade, the system will block the corresponding request.
- Tenant creation is prohibited.
Notice
If the OceanBase cluster is associated with the arbitration service, make sure to upgrade the arbitration service version first, and then upgrade the OceanBase cluster version. For more information, see Upgrade the arbitration service.
You can query the oceanbase.DBA_OB_ARBITRATION_SERVICE system view in the sys tenant to check whether the OceanBase cluster is associated with the arbitration service.
Considerations
Consider the following points when upgrading an OceanBase cluster:
Log archiving is suspended during the upgrade from OceanBase Database V4.0 to V4.1.
If the upgrade requires
ADD SERVERorDELETE SERVERoperations, contact technical support.You cannot directly upgrade to a transitional version. Refer to the upgrade version sequence in the
oceanbase_upgrade_dep.ymlfile.You must run the upgrade script directly on the observer process where the Root Service is located. You cannot connect to the observer process through OceanBase Database Proxy (ODP).
Back up the following parameters before the upgrade, as they may be modified during the upgrade:
Starting from V4.3.0 Beta, OceanBase Database no longer supports the zlib_1.0 compression algorithm. The following precheck is performed before the upgrade:
- The
zlibcompression algorithm cannot be used as the value of thelog_transport_compress_funcparameter during the upgrade. Use another compression algorithm instead. - If the
zlibcompression algorithm is used for any tables during the upgrade, change the compression algorithm of these tables to a supported one or do not use compression. - The
zlibcompression algorithm is not supported for OBKV-Table connections during the upgrade. Use thetableapi_transport_compress_funcparameter to specify another compression algorithm.
- The
In a cluster that uses the ARM CPU architecture or the x86 CPU architecture without support for Advanced Vector Extensions 2 (AVX2), if any columnstore tables were used in the cluster (including the conversion from rowstore tables to columnstore tables), you cannot upgrade from V4.3.0, V4.3.1, or V4.3.2 to V4.3.3 or later. Otherwise, the data accuracy of the upgraded cluster cannot be guaranteed after the upgrade.
When upgrading a cluster from V4.3 to V4.3.3 or later, if an error is returned when you commit logs in a standby tenant, the logs in the tenant cannot be persisted. For more information, see Prepare for data restore.
Upgrade procedure
The upgrade script in OceanBase Database V4.x depends only on the Python scripts in the target RPM package. Specifically, if the target version is V4.1.0 or later, only one upgrade procedure is followed, and only the target version's OceanBase RPM package is needed. After decompressing the OceanBase RPM package, you will find the oceanbase_upgrade_dep.yml file, which records the version upgrade topology of OceanBase Database.
For more information, see Step 2: Confirm the upgrade procedure.
Upgrade notes
- OceanBase Database V4.3.3 can be upgraded from V4.3.0 Beta and its later BP versions, V4.3.1 Beta and its later BP versions, as well as V4.3.2 Beta Hotfix1 and its later BP versions.
- OceanBase Database V4.2.x or earlier cannot be upgraded to V4.3.3. As the version evolves, corresponding upgrade paths will be supported.
- OceanBase Database V4.3.2 reconstructs the persistent format of multi-source data, and therefore format conversion needs to be performed for multi-source data during the upgrade. You need to reserve sufficient upgrade time if a large number of partitions are involved.
- During an upgrade to V4.3.3, make sure that no incremental direct load task is in progress. You can query the
oceanbase.__all_virtual_load_data_statview for confirmation. We plan to resolve this issue in later versions.
Next steps
References
For information about how to upgrade an OceanBase cluster using OceanBase Cloud Platform (OCP), see Upgrade versions.
