Risks of Autoinc rollback errors

Updated at:

In some PolarDB for MySQL clusters that use tables with an auto-increment column, a high availability (HA) failover that coincides with other specific operations can, in rare cases, cause the auto-increment column value to roll back. This behavior can affect subsequent insert operations and compromise data integrity. Therefore, we strongly recommend that you upgrade to the latest revision version as soon as possible. This minor version upgrade requires a brief downtime of approximately 30 seconds. We recommend that you perform the upgrade during off-peak hours.

Risks

When a high availability (HA) failover is triggered by a read-write node issue in a PolarDB cluster and coincides with specific operations, there is a small chance that the value of an auto-increment column in existing tables will roll back. This rollback can have the following consequences:

  • Frequent Duplicate key errors on INSERT operations.

  • Unintentional modification of existing data when using INSERT ON DUPLICATE KEY UPDATE statements.

Affected versions

This issue is fixed in revision versions 8.0.1.1.46.2 and 8.0.2.2.27 for PolarDB for MySQL Cluster Edition and Standard Edition.

Note

You can view the revision version of your cluster in the Configurations section on the cluster details page.

Series

Major version

Affected versions

Fixed version

Cluster Edition, Cluster Edition (Serverless), Standard Edition, and Standard Edition (Serverless)

8.0.1

Versions earlier than 8.0.1.1.46.2

8.0.1.1.46.2

8.0.2

Versions earlier than 8.0.2.2.27

8.0.2.2.27

Resolution

Warning
  • For clusters running an affected version, avoid creating new auto-increment columns to prevent a potential rollback.

  • This minor version upgrade requires a brief downtime of approximately 30 seconds. To minimize business impact, perform the upgrade during off-peak hours.

To resolve this issue and prevent data corruption, we strongly recommend that you upgrade the revision version of your PolarDB for MySQL cluster to 8.0.1.1.46.2 or 8.0.2.2.27, or later.

  1. Go to Configuration and Management > Version Control for the target cluster.

  2. On the Minor Version Upgrade page, in the Upgrade Version section, select Upgrade PolarDB Database Proxy and Kernel.

    Click Upgrade Now.

  3. Click Upgrade Now or Upgrade in Maintenance Window.

    Note

    If you select Upgrade in Maintenance Window, you can view the task details or cancel the task on the Scheduled Tasks page. For more information, see Scheduled Tasks.

  4. In the dialog box that appears, click OK.