[PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."}

ACSD-56226: READ queries return outdated data with synchronous_replication enabled

The ACSD-56226 patch fixes the issue where READ queries return outdated data when the synchronous_replication flag is enabled for slave connection on Cloud. This patch is available when the Quality Patches Tool (QPT) 1.1.69 is installed. The patch ID is ACSD-56226. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.7.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.6-p2

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.6 - 2.4.6-p11
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

READ queries return outdated data when the synchronous_replication flag is enabled. This causes the slave connection to be disabled, leading to database overload.

Steps to reproduce:

  1. Set MYSQL_USE_SLAVE_CONNECTION to true in the environment variables on Adobe Commerce on cloud infrastructure.

  2. Add the following configuration to .magento.env.yaml to set synchronous_replication to false:

    code language-text
    DATABASE_CONFIGURATION:
      _merge: true
      slave_connection:
        default:
          synchronous_replication: false
    
  3. Redeploy and perform frontend actions such as login, add to cart, or place an order.

Expected results:

Slave connection remains enabled when synchronous_replication is set to false.

Actual results:

Slave connection is disabled when synchronous_replication is set to false, causing database overload.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3