Read Replicas issues on Adobe Commerce Cloud 2.4.6 with MariaDB 10.6

This article provides solutions for unexpected behavior when using Read Replicas on Adobe Commerce Cloud 2.4.6 with MariaDB 10.6+.

Affected products and versions

  • MariaDB 10.6+
  • Adobe Commerce on cloud infrastructure 2.4.6

Issue

Non-critical reads are showing incorrect information.

Cause

The slave_parallel_mode config on the database was changed by default to optimistics when the value should be conservative, and the synchronous_replication value in Ece-Tools is defaulting to true when the value should be false.

Solution

  1. Check that the slave_parallel_mode parameter is set to conservative (you will need to raise a support ticket if the value is not showing as conservative). To check, run the following command:

    code language-none
     MariaDB [main]> show variables like 'slave_parallel_mode';
     +---------------------+--------------+
     | Variable_name       | Value        |
     +---------------------+--------------+
     | slave_parallel_mode | conservative |
     +---------------------+--------------+
     1 row in set (0.001 sec)
    
  2. Update .magento.env.yaml database configurations to:

    code language-yaml
        DATABASE_CONFIGURATION:
         _merge: true
            slave_connection:
                default:
                    synchronous_replication: false
    

For steps on updating the database configuration, refer to DATABASE_CONFIGURATION in the Deploy variables topic in the Commerce on Cloud Infrastructure Guide.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a