INSERT
/UPDATE
/DELETE
/... query is executed, the query is delegated to the primary server and the current connection uses only the primary node for subsequent calls. This is ensured by the executeStatement
method in the DebugStack decoration. That way, Shopware can ensure read-write consistency for records within the same request. However, it doesn't take into account that read-only child nodes might not be in sync with the primary node. This is left to the database replication process.group_concat_max_len
is by default higher or equal to 320000
sql_mode
doesn't contain ONLY_FULL_GROUP_BY
SQL_SET_DEFAULT_SESSION_VARIABLES=0
in the .env
file so Shopware does not check for those variables at runtime.config/packages/cart.yml
cart:migrate
command to migrate the existing carts between MySQL and Redis so the migration does not influence end user experience..env
file:DATABASE_URL
is the connection string for the MySQL primary.DATABASE_REPLICA_x_URL
(e.g DATABASE_REPLICA_0_URL
, DATABASE_REPLICA_1_URL
) - is the connection string for the MySQL read-only server.