OceanBase Database allows you to upgrade a cluster by using an upgrade script. The upgrade on the server side has no impact on applications and can be performed without suspending data write or services. OceanBase Database is upgraded zone by zone. During the upgrade, the leader role is switched from one zone to another, and the services running in the zone to be upgraded are migrated to other zones.
This topic describes the upgrade process, considerations, restrictions, and impact.
Notice
You can upgrade an OceanBase cluster of V4.3.0 Beta to V4.3.1 Beta. At present, you cannot upgrade an OceanBase cluster of V4.2.x or earlier to V4.3.1 Beta. As the version evolves, upgrades from V4.2.x to V4.3.x will be supported.
Upgrade process
The upgrade script depends only on the Python script related to the RPM package of the target version. To be specific, if the target version is V4.1.0 or later, only one upgrade process exists and only the RPM package of the target version is required. After the RPM package of OceanBase Database is decompressed, you can obtain the oceanbase_upgrade_dep.yml file, which records the upgrade topology of OceanBase Database.
For more information about how to check the upgrade process, see Step 2: Confirm the upgrade process in Upgrade an OceanBase cluster.
Considerations
When you upgrade an OceanBase cluster, note that:
If the
ADD SERVERorDELETE SERVERoperation needs to be performed during the upgrade, contact OceanBase Technical Support.Transition versions cannot be directly upgraded, but need to be upgraded by following the upgrade path.
To execute the upgrade script, you must connect to RootService in the sys tenant directly instead of by using an OceanBase Database Proxy (ODP).
The following parameters may be modified during the upgrade. Therefore, back up these parameters before the upgrade.
Starting from V4.3.0 Beta, OceanBase Database no longer supports the zlib_1.0 compression algorithm. Observe the following rules during an upgrade:
- The
zlibcompression algorithm is no longer supported for thelog_transport_compress_funcparameter. Use another compression algorithm instead. - If the
zlibcompression algorithm is used for any tables, replace it with another supported compression algorithm or disable compression during the upgrade. - The
zlibcompression algorithm is not supported for TableAPI. You can specify another compression algorithm for TableAPI by using thetable_api_transport_compress_funcparameter.
- The
Limitations
Pay attention to the following limitations when you upgrade an OceanBase cluster:
DDL is disabled in some phases of the upgrade and is automatically enabled after the upgrade.
Major freezes are disabled during the upgrade between some versions and are automatically enabled after the upgrade.
Migration, replication, and load balancing are disabled during the upgrade between some versions.
During the upgrade of a cluster, physical baseline backup and physical recovery are not allowed, but log archiving is not interrupted.
Notice
During the upgrade of OceanBase Database from V4.0 to V4.1, log archiving is interrupted.
Switchover and failover are not allowed during the upgrade.
Tenant creation is not allowed.
Notice
If the OceanBase cluster is associated with the arbitration service, you must upgrade the arbitration service before you upgrade the OceanBase cluster. For more information about how to upgrade the arbitration service, see Upgrade an arbitration service.
You can query the oceanbase.DBA_OB_ARBITRATION_SERVICE view of the sys tenant to check whether the current OceanBase cluster is associated with the arbitration service.
Upgrade impact
Pay attention to the following impact when you upgrade an OceanBase cluster:
The leader role is switched from one zone to another during the upgrade, which increases the response time (RT) a little bit.
The leader-follower switchover during the upgrade can affect your business. Transactions that exceed 100 ms are terminated.
What to do next
References
For more information about how to upgrade an OceanBase cluster by using OceanBase Cloud Platform (OCP), see Upgrade an OceanBase cluster.