Skip to content

health_check.php fails if any database cache engine configured #25669

Closed
@ilnytskyi

Description

@ilnytskyi

Preconditions (*)

  1. Configure any cache to database in env.php
    2.3-develop
    'cache' => [
        'frontend' => [
            '{some_frontend_cache}' => [
                'backend' => 'database',
                'backend_options' => [],
                'id_prefix' => 'U_'
            ]
        ],
        'type' => [
            '{any_cache_type_here}' => [
                'frontend' => '{some_frontend_cache}'
            ]
        ]
    ]

Steps to reproduce (*)

  1. configure any cache type to database

Expected result (*)

  1. health_check.php works

Actual result (*)

  1. health_check.php fails since can't find database class in
$backend = new $cacheBackendClass($cacheConfig[ConfigOptionsListConstants::CONFIG_PATH_BACKEND_OPTIONS]);
  1. health_check.php fails since can't create instance of \Magento\Framework\Cache\Backend\Database and throws expeditions from here
    \Magento\Framework\Cache\Backend\Database::__construct
'Option "adapter" should be declared and extend \Magento\Framework\DB\Adapter\AdapterInterface!'
Option "data_table" or "data_table_callback" should be declared!
Option "tags_table" or "tags_table_callback" should be declared!
'DB Adapter should be declared and extend \Magento\Framework\DB\Adapter\AdapterInterface'

however the cache works just uses default connection
Selection_210

Metadata

Metadata

Assignees

Labels

Component: CacheEvent: cdkharkiv19novFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions