All Products
Search
Document Center

PolarDB:Upgrade evaluation

Last Updated:Jun 12, 2024

The upgrade evaluation feature is provided by PolarDB for major version upgrades to ensure successful execution of upgrade tasks and high upgrade efficiency. The feature allows you to precheck the prerequisites such as the cluster status, upgrade task dependencies, and attributes of the source cluster before you perform a major version upgrade. This way, you can identify the factors that may affect the upgrade progress and resolve issues at the earliest opportunity to reduce the processing and resource costs when you perform the upgrade.

Supported regions

The upgrade evaluation feature is available in the following regions:

China (Hangzhou), China (Shanghai), China (Shenzhen), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Chengdu), China (Hong Kong), Singapore, Indonesia (Jakarta), US (Silicon Valley), and US (Virginia).

Impacts

The upgrade evaluation does not affect your workloads.

Create an upgrade evaluation task

  1. Log on to the PolarDB console.

  2. Create an upgrade evaluation task. PolarDB provides following methods for creating an evaluation task:

    • From the Clusters page: Click Migration/Upgrade Evaluation in the upper-left corner of the Clusters page.

      image

    • From the Migration/Upgrade page: Click Migration/Upgrade Evaluation in the upper-left corner of the Migration/Upgrade page.

      image

    • On the Version Management page of the PolarDB cluster, click the Major Version Upgrade tab. Click Upgrade Evaluation.

      image

    • From the PolarDB buy page: Select Upgrade/Migrate from PolarDB, set Source PolarDB Version and Source PolarDB Cluster, Database Engine, and Database Edition, and then click Migration Evaluation.

      image

  3. Configure parameters for the upgrade evaluation task.

    Parameter

    Description

    Creation Method

    Select Upgrade from PolarDB.

    If you create an upgrade evaluation task from the PolarDB buy page, you do not need to specify this parameter. Upgrade from PolarDB is automatically selected.

    Source PolarDB Version

    The database engine version of the source PolarDB cluster.

    Source PolarDB Cluster

    Select a source PolarDB cluster from the drop-down list.

    Destination Database Engine

    The database engine version of the destination PolarDB for MySQL cluster.

    Product Edition

    The edition of the destination PolarDB for MySQL cluster.

    Only Enterprise Edition is supported.

    Click Next.

  4. PolarDB prechecks and evaluates your source PolarDB cluster and upgrade plan in terms of Basic Information Verification, Migration Task Dependency Verification, Key Information Verification, and Other Verification. Handle the issues based on the evaluation results.

    Answers to some commonly asked questions about upgrade evaluation in PolarDB are provided in this topic. For more information, see FAQ.

    image

  5. Click Continue to Buy or Buy to go to the PolarDB buy page. For more information, see Procedure.

Manage the migration evaluation task

To view the details of the created evaluation task, go to the Migration/Evaluation page. If the evaluation task is complete, you can click Re-evaluate or Buy.

Note

The evaluation task is retained for seven days and then automatically deleted. If your evaluation task has expired, you can create an evaluation task.

image

FAQ

Category

Check item

Solution

Basic Information Verification

Source Instance Running Status

The source PolarDB cluster must be in the Running state.

Source Instance Read/Write Status

The source PolarDB cluster must be in the Running state and in Read/Write mode.

Service-linked Role for PolarDB

The service-linked role for PolarDB is created for the account.

For more information about how to create a PolarDB service-linked role, see Pre-check whether the service-linked role for PolarDB is created. You can also create a PolarDB service-linked role by calling the API operation.

Migration Task Dependency Verification

DTS Permissions

Your Alibaba Cloud account must have the permissions to access cloud resources over DTS.

For more information, see Authorize DTS to access Alibaba Cloud resources.

Source Instance Binary Log Verification

Before you perform the major version upgrade, you must enable binary logging for the source PolarDB cluster. For more information, see Enable binary logging.

Whether Source Instance is Empty

Databases are created in the source PolarDB cluster. You must create a database in the cluster before you perform the major version upgrade.

Source Instance Trigger Verification

If triggers are created for the source PolarDB cluster, delete the triggers first. Otherwise, the upgrade process will be interrupted.

You can manually create triggers in the destination PolarDB cluster after the upgrade process is complete.

Verification for Non-primary-key Tables in Source Instance

If the source PolarDB cluster contains tables without primary keys, duplicate data may occur in the destination PolarDB cluster after data is synchronized.

You can connect to the database on the source PolarDB cluster by using a privileged account and execute the following SQL statement to query tables without primary keys:

SELECT t1.table_schema, t1.table_name 
FROM information_schema.TABLES t1 LEFT OUTER 
	JOIN information_schema.TABLE_CONSTRAINTS t2 
  ON t1.table_schema = t2.TABLE_SCHEMA AND t1.table_name = t2.TABLE_NAME AND t2.CONSTRAINT_NAME 
  IN ("PRIMARY") 
WHERE t2.table_name IS NULL AND t1.table_type = "BASE TABLE" AND t1.TABLE_SCHEMA NOT IN ("information_schema", "performance_schema", "mysql", "sys") 

You can add primary keys to the tables without primary keys.

If you confirm that duplicate data is acceptable, you can ignore this evaluation result and select Continue when the error message is returned when you perform the major version upgrade.

Key Information Verification

Source Instance Root Account Verification

To prevent the system accounts of the destination PolarDB cluster from being overwritten during upgrade, make sure that the root and aliyun_root accounts do not exist in the source PolarDB cluster at the same time. Therefore, you must delete the redundant system accounts in the source cluster before you perform the upgrade. For more information, see Remove redundant system accounts from the source PolarDB for MySQL cluster.