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, limitations, 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.0compression 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 OBKV-Table. You can specify another compression algorithm for OBKV-Table by using thetableapi_transport_compress_funcparameter.
- The
If you use columnstore tables in an OceanBase cluster of V4.3.0, V4.3.1, or V4.3.2 deployed on an Arm-based or x86-based server that does not support Advanced Vector Extensions 2.0 (AVX2) instructions, you cannot upgrade the OceanBase cluster to V4.3.3 or later. This is to avoid data inaccuracy after the upgrade.
When you upgrade an OceanBase cluster from a version earlier than 4.3.3 to V4.3.3 or later, the earlier version cannot parse the logs generated by standby tenants in the target version. In this case, an error is returned when the standby tenants attempt to commit logs. However, the logs are not persisted. For more information about data restore, see Preparations.
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 restore 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 an 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 in the sys tenant to check whether the current OceanBase cluster is associated with an 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 have been executed for over 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.