Skip to content

Config cache reinit() leaves the config in an invalid state #31

@andreas-ateles

Description

@andreas-ateles

Magento calls reinit() when a config cache section is not found in the config cache, with the (seeming) expectation that all of the configuration is fully loaded and available after the call. (A config cache section can in a valid way be missing from the cache in case the cache was cleared.)

The Made_Cache_Model_Config::reinit() doesn't (re)load the configuration, but just leaves it as is for the running request. This causes parts of the configuration to be missing, leading to all kinds of problems, which can in turn get cached in the block cache or other caches. (This is what happened in our case, ultimately due to some additional issues leading to many people getting same session cookie and placing orders with invalid details.)

Whats the reasoning behind overwriting reinit()? Is it only to protect from the thundering herd problem? As it still always needs to regenerate the config (or in some other way get the full configuration), it always needs to call ini(), or it should throw an exception, not to let the rest of the code continue to execute with invalid config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions