Open
Description
Preconditions (*)
- Magento Commerce Edition ver. 2.4.2
- PHP 7.4.6
- Master/slave configuration
Steps to reproduce (*)
- Add a slave connection with
bin/magento setup:db-schema:add-slave
'db' => [
'connection' => [
'indexer' => [
'host' => 'localhost',
'dbname' => 'local_db2',
'username' => 'local_user2',
'password' => 'local_pass',
'model' => 'mysql4',
'engine' => 'innodb',
'initStatements' => 'SET NAMES utf8;',
'active' => '1',
'persistent' => null
],
'default' => [
'host' => 'localhost',
'dbname' => 'local_db2',
'username' => 'local_user2',
'password' => 'local_pass',
'model' => 'mysql4',
'engine' => 'innodb',
'initStatements' => 'SET NAMES utf8;',
'active' => '1',
'driver_options' => [
1014 => false
]
]
],
'table_prefix' => '',
'slave_connection' => [
'default' => [
'host' => 'localhost',
'dbname' => 'local_db2',
'username' => 'local_user2_slave',
'password' => 'local_pass',
'maxAllowedLag' => '',
'model' => 'mysql4',
'engine' => 'innodb',
'initStatements' => 'SET NAMES utf8;',
'active' => '1'
]
]
],
- Navigate on FE or BE or run a cli command: three different scenariuos
Expected result (*)
- In case of CLI command, we expect that an export of products (for example), can work whole on slave database (all read operations). The master/slave configuration, is ignored (never used) in the CLI Context.
- In case of BE operations (i.e. products list, sales order list), read queries should be ran on slave connection, lightening the master database.
Actual result (*)
- Any command runned via CLI, "ignores" slave connection.
- In case of BE operations (i.e. products list, sales order list) only a few queries are ran on slave database, the most are ran on master database. In the sales orders lists, in example, when framework save data on the "theme" table, all following queries go on the master connection, without return back to slave connection (a ratio of ~10% on the total, with the most of select statements on master database).
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Ready for Grooming