Abstract:This document describes the principle and usage of upgrade, an important o&M function of GaussDB(DWS).

Operation and maintenance management module is the most basic and important part of any software product. It is the portal of software products, and also the premise and foundation for users to contact and use software products. For example, installation and deployment can enable users to get started quickly, upgrade can enable smooth product update, capacity expansion can enable product expansion, fault repair can enable product rapid recovery, and alarm monitoring can enable products to predict or rectify faults in time. It has high requirements in usability, ease of use, reliability, maintainability and online operation and maintenance. This document describes the principle and usage of upgrade, an important o&M function of GaussDB(DWS).

preface

Constant update and evolution is an important behavior of software, and upgrade is an important guarantee of software update. With new features being rolled out and historical issues being fixed, software updates and patches are especially important. The upgrade and patch installation must meet the following requirements:

  • Seamless, smooth transition between software versions.
  • Service interruption time as little as possible, so that online.
  • User experience forward compatibility.

And database upgrade is more complex than other software upgrade, not only the software itself update, but also support its management data upgrade. When upgrading a database, consider the following factors:

  • Software upgrade refers to the update of the software itself.
  • Metadata upgrades are updates in the way software manages data.
  • Upgrade service data, that is, upgrade software management data.

As database versions evolve rapidly, upgrade becomes more important. Reliability, performance, service interruption, and ease-of-use need to be improved.

Evolution of upgrade

The performance and reliability of GaussDB(DWS) gradually improve after multiple versions are upgraded. It also provides various upgrade methods in different scenarios. Here is the evolution:

Full-version upgrade: The database of the new version is rebuilt, metadata is imported and exported, and service data is fully upgraded in MV mode. It depends on the number of database objects, the size of business data, and the number of business data table files. Discontinued in V1R8.

In-place upgrade: Replace binary in place and modify the system table mode. It depends on the logical size (number of data objects) and physical size (dirty pages of the system table) of the system table and the number of databases.

Minor offline upgrade: stop, replace binary, and start the cluster. Service interruption time is the restart time of a cluster.

Small version scrolling upgrade: Keep the old binary file, install the new binary file in the new directory, scroll to the new binary file based on components (om_monitor, CM_agent, ETCD, CN, dummy DN, Standby DN/GTM/CM, master DN/GTM/CM), and then perform an active/standby switchover. Two switchover modes are involved in the upgrade process. The service interruption time depends on the online switchover and CN retry capabilities.

Small version intermittent upgrade: Based on the rolling upgrade of a small version, retain the old binary files and install the new binary files in the new directory. First, switch the management components (OM_monitor, CM_agent, ETCD, and CM_server), and then switch the service components (GTM, CN, and DN) once. Services are interrupted only once. DWS is currently in use.

This section describes the in-place upgrade principle

Currently, the main upgrade mode of 8.0 is in-place upgrade. It has been successfully upgraded to the new version under the existing network cable and multiple sets of public cloud clusters.

1. Public cloud upgrade process

DWS service upgrade is divided into two parts: management control upgrade and tenant upgrade.

The CDK platform is used to roll back the management and control plane of each region. After the upgrade, component functions are verified.

Upgrade instance information:

Tenant plane upgrades are performed by SRE on the ServiceCM platform. The operations include DWS Guest upgrade and database kernel upgrade:

The main process is as follows:

2. Upgrade updatetool offline

Log in to the UpdateService operation page, create an upgrade project, and perform one-click upgrade.

3. Upgrade the database kernel

The database kernel upgrade is carried out by replacing binary and updating metadata.

Include initial phase, access review, environment preparation, downtime, backup, upgrade, Update catalog, commit 8 phases.

Upgrade Performance Target

Locating upgrade Problems

The following table provides an overview of upgrade process logs:

UpdateService logs are classified into audit logs and debug logs. See the following table for their locations:

conclusion

In the process of using data warehouse products, upgrading and patching are the most frequently used functions. This document only describes the general process, basic principles, and performance objectives of the GaussDB(DWS) upgrade. If upgrade problems occur during network change, contact technical support.

Click follow to learn about the fresh technologies of Huawei Cloud