Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anticipate AppKernel creation so that cache clear locking is used effectively #31844

Open
2 of 8 tasks
jolelievre opened this issue Mar 20, 2023 · 0 comments
Open
2 of 8 tasks
Labels
8.1.x Branch BO Category: Back Office Developer Feature Developer-oriented feature Needs Specs Status: issue needs to be specified Refactoring Type: Refactoring Task Type: neither a bug or a feature

Comments

@jolelievre
Copy link
Contributor

jolelievre commented Mar 20, 2023

Prerequisites

Describe the bug and add attachments

This issue is about improving/fixing the bugs we encountered while the Symfony cache is being cleared.

Here's a list of related issues (but there are probably others):
#28304
#30011

One strategy suggested was to check if the lock file was already blocked before the kernel is even started:
#31419

But it seemed weird that we had to do this for Symfony so in the meantime, an alternative solution was proposed in this PR: (also based on a lock file but custom to PrestaShop:
#31820

Expected solution (we're not sure it is valid, that's why it needs to be tested)

This solution is still not ideal because again we ignore the system from Symfony that is supposed to handle this, so a better solution should be searched in 8.1.x (if we find the time) or 9.0 if the changes are too impactful, here is the idea.

  • In admin-dev/index.php the creation of the Kernel should be the very first thing done
  • Many operations are handled in config.inc.php they should be moved and handled by the Kernel itself via container pass or listeners
  • To avoid a big impact since config.inc.php is also used by the front we can split the files into config.inc.php and admin.config.inc.php to reduce impacts
  • Once we manage to make the BO work with this we then need to validate that it is indeed a solution to the related problem (cache clearing and concurrent calls while the container is being built)
  • We should check in the cache:clear command from Symfony if the lock file is created early enough so that any concurrent process is blocked as soon as the cache rebuilding starts
  • Finally we need to check all the impact this modification can have via our automated tests and functional tests
@jolelievre jolelievre added Refactoring Type: Refactoring Developer Feature Developer-oriented feature 8.1.x Branch Bug Type: Bug BO Category: Back Office labels Mar 20, 2023
@hibatallahAouadni hibatallahAouadni added the Needs Specs Status: issue needs to be specified label Mar 24, 2023
@hibatallahAouadni hibatallahAouadni added Task Type: neither a bug or a feature and removed Bug Type: Bug labels Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.1.x Branch BO Category: Back Office Developer Feature Developer-oriented feature Needs Specs Status: issue needs to be specified Refactoring Type: Refactoring Task Type: neither a bug or a feature
Projects
None yet
Development

No branches or pull requests

2 participants